On Friday 20 March 2009 11:05:05 hadi motamedi wrote: >45 1 * * * find /usr/local/statsvr/counters/main/processed -atime +60 -exec >rm -f {} ';' >Can you please let us know what is the meaning of "-atime" & "-exec" >commands used here ?
"-atime" filters the find results based on the last-access time (atime) of the file. The "+60" argument requires the files to have been accessed 60 or more days ago to pass the filter. "-exec" runs a command on each file that has not already been filtered out. The command is terminated with a single semi-colon as an argument. Any argument that is simply "{}" will be replaced with the name of the file being processed. Taken together, the command will remove any file (or empty directory) that has not been accessed in the last 60 days. (It will try to remove non-empty directories, but fail.) -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
signature.asc
Description: This is a digitally signed message part.