What is the clearcase Command to find all view private files in the current directory recursively?
Linux recursive directory listing using ls -R command. The -R option passed to the ls command to list subdirectories recursively.
Answer. To find view-private files within a snapshot view, use cleartool ls -recurse -view_only .
The ls command is used to list files or directories in Linux and other Unix-based operating systems. Just like you navigate in your File explorer or Finder with a GUI, the ls command allows you to list all files or directories in the current directory by default, and further interact with them via the command line.
Use the ls command to display the contents of a directory. The ls command writes to standard output the contents of each specified Directory or the name of each specified File, along with any other information you ask for with the flags.
The usual commands are based on cleartool ls
:
ct lsprivate
: but it is only for dynamic views, not snapshot viewsct ls -rec -view_only
: at least, it works in both snapshot and dynamic viewsHowever both list also your checked-out files.
If you want only the private files, ie skipping the hijacked/eclipsed/checked-out and symlinks, you need to filter those out.
In Windows, that would be:
for /F "usebackq delims=" %i in (`cleartool ls -rec ^| find /V "Rule:" ^| find /V "hijacked" ^| find /V "eclipsed" ^| find /V "-->"`) do @echo "%i"
In Unix:
cleartool ls -rec | grep -v "Rule:" | grep -v "hijacked" | grep -v "eclipsed" | grep -v "-->" | xargs echo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With