1748285 Members
3634 Online
108761 Solutions
New Discussion юеВ

Re: cleaning /tmp

 
Entisar
New Member

cleaning /tmp

how to clean /tmp
4 REPLIES 4
wobbe
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 -
http://lowfatlinux.com/linux-delete-files-rm.html

Regards,
Murali
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.

/etc/cron.daily/tmpwatch

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?