且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在我的Linux主目录中找到视图位置

更新时间:2021-09-22 22:24:08

如果这些视图不在 / view 下,则表示存在快照视图。

(不是Web视图,因为 cleartool ,这意味着没有CCRC。

If those views aren't under /view, that means there are snapshot views.
(Not web views, since cleartool is mentioned, which means no CCRC)

在快照视图中查找文件的本地副本,您无法从其标签中找到快照视图

这意味着一个简单的 cleartool lsview -l 和一些 grep 不会只从主目录中选择视图。

它将选择视图,无论您选择将其加载到何处。

And as mentioned in "Find local copy of files in snapshot view", you cannot find a snapshot view from its tag alone.
That means a simple cleartool lsview -l with some grep won't select only your views from your home directory.
It would select your views, wherever you chose to load them.

user_cqfix.vws 是视图工作区存储。

最简单的解决方案是转到每个 HOME 直接子目录,然后执行 cleartool lsview -l -cview 命令。

视图的所有者(行 视图所有者:...)和视图存储路径(行 全局路径:...)将列在 cleartool 命令的输出中。

The simplest solution would be to go to each of your HOME immediate sub-directories, and do a cleartool lsview -l -cview command.
The owner (line "View owner: ...") of the view and the view storage path (line "Global path: ...") will be listed in the output of the cleartool command.

注意,假设您的视图直接加载到 HOME 下。

如果它们比直接子目录更深入,那么您需要对 HOME 中的所有目录递归重复该过程。

Note, that assume that your views are loaded directly under your HOME.
If they at a greater depth than a direct sub-directory, then you need to repeat that process recursively for all directories within your HOME.

最后,这很有意义,如果您需要将视图存储路径( *。vws )与快照视图的加载路径相关联(因为赢得了ClearCase) (无法告诉您快照视图的根目录在哪里)。

Finally, this makes sense if you need to associate a view storage path (*.vws) with the path where your snapshot view is loaded (since ClearCase won't be able to tell you where the root directory of a snapshot view is).

如果不需要根目录路径,那么一个简单的cleartool lsview -l将列出 all 视图,您可以选择

If you don't need the root directory path, then a simple cleartool lsview -l would list all views, with you able to select the ones you want.

也请查看 关于快照视图存储目录:如果所有视图都使用相同的视图存储服务器,那么您只需知道其公共根共享路径即可推断视图存储路径。

Look also at "About snapshot view storage directories": if all your views are using the same view storage server, then you could simply infer the view storage path by knowing its common root shared path.

注意,有关查找快照视图根目录的信息,此线程提到:

Note, regarding finding "snapshot view" root directories, this thread mentions:


ClearCase没有提供一种好的内置方法来标识快照视图的根工作目录。该信息存储在用户配置文件中。

在Windows上,快照视图仅由创建它们的主机上的ClearCase识别。这是因为工作目录信息存储在本地创建视图的计算机上的用户配置文件(注册表)中。

如果您对特定用户的快照视图感兴趣,请使用以下命令查看注册表:

ClearCase does not provide a good built-in method for identifying the root working directory of a snapshot view. That information is stored in a user profile.
On Windows, snapshot views are only recognized by ClearCase on the host where they were created. This is because the working directory information is stored locally in the user profile (registry) on the machine where the view was created.
If you are interested in a specific user's snapshot views, look in the registry using:



\HKEY_USERS\<SID>\Software\Atria\ClearCase\CurrentVersion\Workspaces 




其中&lt ; SID> 是给定用户的基于文本的安全性标识符。

通过适当的管理访问,也可以通过连接到远程注册表来访问此信息。不过,通常每台PC只能有一个用户,并且要查找当前用户的快照视图目录,只需使用:

where <SID> is the text-based Security Identifier for the given user.
With the proper administrative access, this information is accessible by connecting to a remote registry as well. Typically though, there is only one user per PC, and to find snapshot view directories for the current user, you would just use:



\HKEY_CURRENT_USER\Software\Atria\ClearCase\CurrentVersion\Workspaces 




如果将目录更改为此处列出的目录,则可以使用
' cleartool lsview -cview '找到它是哪个视图。

If you change directories to the directories listed there, you could use 'cleartool lsview -cview' to find which view it was.

在UNIX上,用户个人资料信息存储在〜/ .ccase_svreg 中,由于主目录通常是共享的(自动挂载在许多客户端上),因此快照视图在任何有权访问工作目录的ClearCase客户端上都可以使用(就ClearCase而言)。

On UNIX, the user profile information is stored in ~/.ccase_svreg, and since home directories are typically shared (automounted on many clients), the snapshot view is useable (in the ClearCase sense) on any ClearCase client that has access to the working directory.

话虽如此,请记住您可以多次复制快照视图(只需复制隐藏文件 view。 dat 在任何其他目录的快照视图的根目录中找到,并且可以记住:该快照视图现在存在于两个不同的位置!

That being said, remember you can replicate multiple times a snapshot view (simply copy the hidden file view.dat found at the root directory of a snapshot view in any other directory, and presto: that snapshot view now exists in two different places!