[K12OSN] /tmp

John Lucas mrjohnlucas at gmail.com
Fri Oct 5 18:37:09 UTC 2007


On Friday 05 October 2007 02:54, Terrell Prudé Jr. wrote:
> Michael Blinn wrote:
> > What is the convention for cleaning out /tmp in v6?  It's slowly
> > filling up, and I can see some very old files in there. Is there a
> > /tmp manager, or a current method for 'rm -rf /tmp/*' on reboot, or ....?
> > Thanks,
> >  Michael
>
> I generally just
>
>   rm -rf /tmp/*
>
> as root every so often.  The whole point of /tmp is to hold temporary
> files while a user is logged on, especially with "heavy" desktops like
> GNOME and KDE.  When the user is no longer logged on, that user's files
> in /tmp are no longer needed.
>

Just be aware that if /tmp is mounted on it's own filesystem, you will be 
deleting "lost+found", not a good thing.

If /tmp is merely a sub-directory of another filesystem, then "rm -Rf /tmp/*" 
should only be run while in single-user mode, and any hidden files (with 
leading ".") will remain untouched. In multi-user mode, there is a danger of 
removing a "live" lock file or socket.


-- 
        "History doesn't repeat itself; at best it rhymes."
                        - Mark Twain

| John Lucas                          MrJohnLucas at gmail.com               |
| St. Thomas, VI 00802                http://mrjohnlucas.googlepages.com/ |
| 18.3°N, 65°W                        AST (UTC-4)                         |




More information about the K12OSN mailing list