RHCE
January 31, 2014, 4:58am
1
I wanted to know whether all files under /tmp can be safely removed. I guess that /tmp may also have temporary files for applications currently being worked on, so at the most those applications may just shut down.
I hope that my question is clear whether all files under /tmp can be safely removed.
Please revert with the reply to my query.
Regards
vbe
January 31, 2014, 5:15am
2
Usually cleaning up /tmp is done at (shutdown or) reboot time... to avoid embarasing situations... So "All" files isnt a good idea at all...
1 Like
As an addendum to vbe's reply...
Short answer - No!
If however you know EXACTLY what the temporary files are, and, are for, then you can
delete those particular temporary files at your leisure.
1 Like
RedHat has a tool "tmpwatch" for a relative safe cleaning.
rpm -q tmpwatch
ls -l /etc/cron.daily/tmpwatch
file /etc/cron.daily/tmpwatch
The script has hard-coded 10 days for /tmp. You can change to e.g. 1 day.
1 Like
RHCE
February 1, 2014, 1:49am
5
Thanks for your reply. I was wondering why I did not receive the mail notification for your reply.
Scott
February 1, 2014, 2:57am
6
From which reply? You only get notified once for each subscribed thread until you visit the forums again.
1 Like