crontab to clear tmp files
Posted by: skb104
Posted on: 2006-06-18 09:34:00
I am trying to write a crontab that will clear all of my non-session files out of the /tmp directory every hour: Here is the contents of my crontab file:
17 * * * * /home/<username>/hourly/clear_tmp.sh
Inside of clear_tm.sh I have:
#!/bin/bash
rm -f $(find /tmp -type f | grep -v sess_);
Im a little bit of a newbie with the crontabs, can someone let me know where my problem is? Thanks in advance.