To remove periodically some files from a specific directory you can easily setup a cron entry. Execute in shell
crontab -e
and add
*/60 * * * * find /home/my_home/some_dir/ -name '*.dat' -mmin +60 -exec rm {} \;
where .dat is the suffix of the files and "-mmin +60 -exec rm {}" is the option telling to remove the files with data modified more than 60 minutes ago.
If your crontab uses Vim
Friday, January 22, 2010
How to Periodically remove temporary files in Linux
Posted on 12:05 AM by Unknown
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment