in reply to Re^2: Automatically delete files
in thread Automatically delete files
The '*' for the first five fields just means 'every'. So to run a command every day at 1:30 we use:minute hour day_of_month month day_of_week your_command_to_execute
See man 5 crontab for a fuller description of the values you can use in those first five columns.30 1 * * * some_command
This (man find) tells find to A) look in your Blast/updated/ directory, B) take files modified a day ago, and C) execute "/bin/rm FILENAME" for each one.find /home/march05/msc0516/public_html/Blast/updated/ -mtime 1 -exec / +bin/rm '{}' \;
Note also that the cron daemon will email you any output generated by the commands that are invoked by the crontab ... this is very handy for getting emails of errors.30 1 * * * /home/march05/msc0516/public_html/Blast/deleteFiles.pl
|
|---|