如何在我的Linux主目录中找到视图位置 [英] How to find the view location in my linux home dir

查看:103
本文介绍了如何在我的Linux主目录中找到视图位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Linux主目录下,我在下面提到的不同文件夹下有很多视图。

I have many views in my Linux home dir under different folders mentioned below.

Home 
  CCVIEWS
  views
  Development
  testproject
  :
  :
  etc.

现在我想以以下格式列出我的linux目录中的所有clearcase视图,以便在其他脚本上工作。

Now i want to list all the clearcase views in my linux dir in below format to work on other script.

user_test_Work1.vws
user_test_Work2.vws
user_dev_Work1.vws
user_newproject_Work.vws
user_cqfix.vws 

如何在我创建的主目录中搜索所有视图并在shell脚本中显示视图列表?

How to search all the views in my home directory created by me and display the list of the views in shell script?

当前一次只能显示一个文件夹视图,但是我需要以上述格式搜索和显示所有视图。

Current at a time I can display one folder views but I need to search and display all the views in the above format.

我的视图仅是动态视图,不是快照。我的问题是视图存储在多个目录中。需要在我的Unix主目录中搜索所有视图。现在我正在使用命令cd〜/ views ViewCount = ls〜/ views来完成这项工作。但这将列出一个目录中的视图。以同样的方式,我需要在所有目录的home目录中列出所有视图。是否有任何方法可以搜索所有视图并列出视图

My views are dynamic views only not snapshot . My issue was with views stored in multiple directories . Need to search all the views in my unix home dir . Now i am using commands cd ~/views ViewCount=ls ~/views to do the job . But this will list the views in one dir . In same way i need to list all the views in my home dir in all directories .Is there any way to search all views and list views

推荐答案

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

(不是Web视图,因为<$ c提到$ c> 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 <​​/ code> 和一些 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 




其中< ; 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!

这篇关于如何在我的Linux主目录中找到视图位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆