开发者

how to list files of specific permissions using UNIX ls command?

I would like to s开发者_JAVA百科ee all the files recursively in a directory or drive which are not read only.

I would like to do this as i am using the clear case and i would like to check on on the files which are to be added to he source control or view-private files.

even a clear case command would help thanks. For clear case specific i tried "ls -vob_only" command but not helped or i failed to use it so felt that using UNIX command might help.


find . -type f -perm -o=r


find . -type f -perm 

for more information check the man page for -perm options.


A committed file in ClearCase is indeed read-only.

If by "not read only" you refer to private files not yet added to a view, you can start by looking for private files, based on grep rules on a recursive ls

cleartool ls -r -nxn

That would be safer than the "read only" criteria, since private files can also be read only (even though they are "not checked-in" yet, not yet managed by ClearCase)

The idea behind a recursive ls is to display all the rules associated with all the files of your view.

  • No rule means "private" (whether the file is read-only or not)
  • Rule: ...\aBranch\LATEST means it is committed (and -- incidentally -- read-only)
  • Rule: CHECKEDOUT means it is committed, but being modified (read-write, but nothing prevents the user to make it read-only again without checking it in)
  • Rule: hijacked/eclipsed: committed, but modified without having being checked-out yet (read-write, but again, can be turned read-only without notifying ClearCase)

So you can grep whatever set of files you actually need from that list, based on ClearCase rules (or lack thereof).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜