/ Published in: Bash
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.
Expand |
Embed | Plain Text
#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 {} \;
You need to login to post a comment.
