How is the
/tmp directory cleaned up? Is it automatic? If so, how frequently is it cleaned up?
Note! Answer is outdated since ubuntu 14.04.
See answer from Martin Schröder below or click link: http://askubuntu.com/a/759048/1366
The cleaning of
The script does roughly the following: if a file in
The default value of
The directory is cleared by default at every boot, because
Here you can change the time in the following file:
The default setting that tells your system to clear
The current value of
This setting would allow files to stay in
In Ubuntu 14.04 this is done by
On one of our servers running Ubuntu, we have a script to remove files in /tmp and it runs nightly.
The script is:
Just save the contents above to a file chmod 775 the file and create a cron entry to run it. Since this is a web server we don't want to reboot it for obvious reasons.
protected by Community♦ Feb 11 '15 at 14:09
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?