/tmp running out of inodes

Kirk Strauser kirk at strauser.com
Thu Dec 18 17:33:26 UTC 2008


On Thursday 18 December 2008 10:54:33 Tankko wrote:

> On a side question...what the the best policy for deleting files from
> /tmp?  Seems like a lot of apps are happy to leave files in /tmp.

What kind of files are you seeing in /tmp?  I have files in mine from July, but 
only about 7,000 files today - not nearly enough to run out of inodes (not that 
it should crash the FS anyway).

> Is clean up commonly done as a cron job?  What about files like mysql.sock=
> which are important.  I can't just blindly remove everything in /tmp each
> night.

I think you really need to figure out what's spamming /tmp.  You *can* do 
something like "find /tmp -type f -oldermt '3 days ago' -delete", but that's 
just addressing the symptoms.
-- 
Kirk Strauser


More information about the freebsd-questions mailing list