On Sun, 08 Jun 2003 16:22:00 +1000 Basil Chupin <blchupin@tpg.com.au> wrote:
DB Troll wrote:
What is the best way to go about cleaning up the hard drive af no longer needed files and directory left over from various downloads etc. My temp directory alone is almost 400mb. TIA
I, too, am interested in knowing the best way (specifically, which files can be deleted) so would appreciate someone who knows the answer responding to the request above -- or at least providing the place to go to to find the answer.
There is a setting in yast2 somewhere for "max days in temp", but honestly I can't find it in yast2. I delete everything out of my temp directory evertime I shut the machine down, of course I just have a desktop dialout. You can put this in halt.local ############################ #!/bin/sh rm -r /tmp/.* rm -r /tmp/* rm -r /var/tmp/.* rm -r /var/tmp/* ############################ #or if you never reboot........you can delete files older than a certain time ############################# #!/usr/bin/perl # For each file in the folder.. while(</temp/*>) { # If the file is not a directory, and is older than 45 minutes, delete it if ((!-d $_) && (-M $_ > .03124)) { unlink $_; } } ############################## -- use Perl; #powerful programmable prestidigitation