1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Need help with this

Discussion in 'Plesk for Linux - 8.x and Older' started by rafcarter, Oct 12, 2005.

  1. rafcarter

    rafcarter Guest

    0
     
    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 ?
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    It would look like:
    Code:
    *	*/6	*	*	*	rm -rf /home/files/* >/dev/null 2>&1
    Which corresponds to:
    Code:
    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...
     
Loading...