On Sat, 26 Apr 2003 07:04:50 -0700 (PDT)
Jamu Pegel Linux
hi list, does /tmp contain temporary files ? If it does, how to empty it because mine is 1.2 GB large ! That's make my space left 1% of 5GB !
Here is what I do, I put the following scripts in halt.local. The second script is for cleaning up my history files. ######tempcleaner############################# #!/bin/sh # a perl idea for your amusement #I already had something similar. It actually deletes files older than 45 #minutes. Just change .03124 to a "3" for 3 days. #perl # For each file in the folder.. #while() { # # If the file is not a directory, and is older than 45 minutes, delete it # if ((!-d $_) && (-M $_ > .03124)) { # unlink $_; # } # } rm -r /tmp/.* rm -r /tmp/* rm -r /var/tmp/.* rm -r /var/tmp/* ###############history-cleaner###################### #!/bin/sh cat /dev/null > /root/.mc/history cat /dev/null > /root/.bash_history cat /dev/null > /home/zentara/.mc/history cat /dev/null > /home/zentara/.bash_history -- use Perl; #powerful programmable prestidigitation