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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find command, strange on AIX

Status
Not open for further replies.

jpillonel

Programmer
Dec 17, 2003
61
CH
Hello,

I found on the forum a lot of question about the find command to exclude some folders... but I could not resolve my problem:

I start a script from /

This script should delete all files older than XX in a particular folder recursively. There only one folder and all it subfolder which shoud not be concerned by the find command:

find /PRODUCTION/PHAR \( -name "*" -mtime +64 \) -o \( -type d ! -name /PRODUCTION/PHAR/Sources -prune \)

This command return no files..

I tried this one too:

find /PRODUCTION/PHAR \( -name "*" -mtime +64 \) -o \( -type d ! -name /PRODUCTION/PHAR/Sources \)

This one return all the files (Sources is not exclude.)

Thanks in advance !
 
Perhaps this ?
find /PRODUCTION/PHAR -mtime +64 ! \( -type d -name Sources -prune \)


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top