rafcarter
12th October 2005, 11:19 PM
Can you tell me exactly what the cron job would look like if I wanted to delete all files under /home/files every 6 hours every day ?
jamesyeeoc
13th October 2005, 12:34 AM
It would look like:* */6 * * * rm -rf /home/files/* >/dev/null 2>&1Which corresponds to:Min Hr DM M DW Command
* */6 * * * rm -rf /home/files/* >/dev/null 2>&1
The ">/dev/null" shovels the output to the bit bucket, the "2>&1" shovels errors (2) to stdout (&1) which of course goes to the bit bucket...
vBulletin® v3.6.12, Copyright ©2000-2008, Jelsoft Enterprises Ltd.