Return to Snippet

Revision: 11164
at January 26, 2009 23:29 by inkdeep


Initial Code
#command line / shell script
sudo find /tmp -depth -type f -atime +3 -exec rm {} \;

#crontab
0 0 * * * /usr/bin/find /tmp -atime +3 -exec /usr/bin/rm {} \;

Initial URL

                                

Initial Description
Clear files in /tmp directory that are older than three days - terminal/cron
this is a very simple example - could also remove by last access time, etc.

Initial Title
clear /tmp of files older than 3 days

Initial Tags
Bash, terminal

Initial Language
Bash