Originally posted by: kenlee
Hi,
I have been trying to use find to remove certain files but also exclude other files similar.
For instance,
I am trying to remove all files that end in 1 (eg 3453431 )and am -mtime +8 with a
find /dir/dir -name "*1" -mtime +8 -exec rm {} \:
Now in the same directory I also have some files that are named po32321 and I want to keep these files for 30 days. Now the command above will remove the po files that are older than 8 days as it also falls under that criteria.
My question is how can I exclude these po files from the find /dir/dir -name "*1" -mtime +8 -exec rm {} \: portion of the script and have them delete after the allotted 30 days?
I have tried many different methods that have been all but useless, i hope someone out there can help.
Thanks.
#AIX-Forum