Hi, All,
I'd like to delete files older than 1 day.
I thought the following command
find /your_directory -mtime +1-exec rm -f {} \;
will do the work, but not so, it seems like it won't delete files unless it is 2 days old or older. the files between 1 day and 2 days old does not get deleted, so does +1 actually means 2 days? if not so, why it won't delete files between 1 and 2 days old? can someone please help me?
Hi, All,
I'd like to delete files older than 1 day.
I thought the following command :
find /your_directory -mtime +1-exec rm -f {} \;
will do the work, but not so, it seems like it won't delete files unless it is 2 days old or older. the files between 1 day and 2 days old won't get deleted, so does +1 actually means 2 days? if not so, why it won't delete files between 1 and 2 days old? can someone please help me?
Yes, the "find" has three options for number of days:
1) +n --> More than 'n' days ago.
2) -n --> Less than 'n' days ago.
3) n ---> Exactly 'n' days ago.
Thus, if you specify '+1', it means more than 1 day ago.
Actually, i wanted know about the cron entry path in my UNIX server?
if i issued the crontab -l it will listout the all cront entries in the current server, But i wanted to know about the PATH where all the cron entries is stored?