tags:

views:

55

answers:

3

I would like to see 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.

+2  A: 
find . -type f -perm -o=r
Peter van der Heijden
-1. Not a ClearCase command. And that would list private files that are read-only, giving the false impression they are managed by ClearCase even though they haven't been committed yet. And that doesn't included hijacked or eclipsed files (which, after being read-write, can also end up read-only if the user change their permissions). This simply doesn't answer what the OP is actually asking for.
VonC
A: 
find . -type f -perm 

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

Vijay Sarathi
A: 

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).

VonC