Showing results for 
Search instead for 
Did you mean: 

cleaning /tmp

Occasional Visitor

cleaning /tmp

how to clean /tmp
Respected Contributor

Re: cleaning /tmp

man rm
P Muralidhar Kini
Honored Contributor

Re: cleaning /tmp

Hi Entisar,

You have to use the RM/RMDIR command to delete the files/directory.

Check the following link for more details -

Let There Be Rock - AC/DC
Ralph Grothe
Honored Contributor

Re: cleaning /tmp

You could also handle /tmp the Solaris way,
i.e. mounting that filesystem as tmpfs from RAM.
This lifts the burden to clean up from the admin because all contents get lost on reboots (e.g. during maintenance).
It also frees you the blocks your /tmp occupied on hdd.
See "man mount" and look for tmpfs mount options.
I often use these in my fstab:

$ grep /tmp /etc/fstab
none /tmp tmpfs rw,mode=01777,size=512m,noexec,nosuid,nodev 0 0

Madness, thy name is system administration
Ivan Ferreira
Honored Contributor

Re: cleaning /tmp

Normally the tmpwatch script will keep your tmp directory clean.


See man tmpwatch.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?