Operating System - HP-UX
1825591 Members
2052 Online
109682 Solutions
New Discussion

Detail abt following command

 
vinothkumar kandasamy
Occasional Contributor

Detail abt following command

Hi,

$find . -xdev -mtime -5 -size +2000 -exec ll -d {} \;

what is the output of this command
2 REPLIES 2
Ivan Krastev
Honored Contributor

Re: Detail abt following command

This will find files in local filesystem, without crossing mount points (-xdev), modified in last 5 days (-mtime -5) and with size (2000 blocks - one block is 512) and display long listing of results (ll -d).


regards,
ivan
Yogeeraj_1
Honored Contributor

Re: Detail abt following command

hi,

man find would have explained it better!

below an extract from man of the switches you are using in your find command.

-xdev
A position-independent term that causes find to avoid crossing any file system mount points that exist below starting points enumerated in pathname_list. The mount point itself is visited, but entries below the mount point are not. Always true.


-mtime n
True if the file modification time subtracted from the initialization time is n-1 to n multiples of 24 h. The initialization time shall be a time between the invocation of the find utility and the first access by that invocation of the find utility to any file specified in its path operands.


-size n[c]
True if the file is n blocks long (512 bytes per block). If n is followed by a c, the size is in bytes.

-exec cmd
True if the executed cmd returns a zero value as exit status. The end of cmd must be punctuated by a semicolon (;) or a plus sign (+) (semicolon and plus are special to the shell and must be escaped). When + is used, cmd aggregates a set of pathnames and executes on the set. Any command arguments between the first occurrence of {} and + are ignored. The reason for preferring + to a ; is vastly improved performance. Any command argument {} is replaced by the current path name. cmd may contain supplementary code set characters.


hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)