zentara wrote:
On Sun, 08 Jun 2003 16:22:00 +1000 Basil Chupin
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() { # If the file is not a directory, and is older than 45 minutes, delete it if ((!-d $_) && (-M $_ > .03124)) { unlink $_; } } ##############################
Thank you for this. But aren't there any other files, not in the temp directory, which need deleting? For example, in Windows log files, amongst others, are candidates for regular deletion. BTW, look in Yast2 Control Centre>System>Editor for /etc/sysconfig Files>System>Cron for max_days_in_temp. -- Computers are useless. They can only give you answers. Pablo Picasso