Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Explaination of the script line

Status
Not open for further replies.

msen

IS-IT--Management
Apr 24, 2001
36
US
/usr/bin/ls -l $(find . \( -type d ! -name . -prune \) -o \( -mtime +$1 -print \))

Can anyone explain, what is happening in the above statement.
 
[tt]
ls -l => List files
$( => execute command, result is files to list
find . => Search in current directory
\(
-type d ! -name . -prune => Directories except '.' (no recursive search)
\)
-o => or
\(
-mtime +$1 -print => File's data was last modified since $1*24 hours ago.
\)
)
[/tt]

Jean Pierre.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top