Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command to find all view private files in the current directory recursively

What is the clearcase Command to find all view private files in the current directory recursively?

like image 594
eeerahul Avatar asked Oct 05 '11 05:10

eeerahul


People also ask

How do I list all files in a directory recursively?

Linux recursive directory listing using ls -R command. The -R option passed to the ls command to list subdirectories recursively.

How do I list private files in clearcase?

Answer. To find view-private files within a snapshot view, use cleartool ls -recurse -view_only .

How to list all files in a directory and subdirectory in Linux?

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.

Which command is used to list all the files in your current directory as well as in subdirectories?

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.


1 Answers

The usual commands are based on cleartool ls:

  • ct lsprivate: but it is only for dynamic views, not snapshot views
  • ct ls -rec -view_only: at least, it works in both snapshot and dynamic views

However 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 
like image 189
VonC Avatar answered Sep 21 '22 07:09

VonC