Initial setup -- clearing old tmp files
All, My machine is accumulating junk in /tmp /var/tmp I found /etc/cron.daily/suse.de-clean-tmp which is designed to handle this. It is not running currently because I don't have it enabled in /etc/sysconfig/cron (why not??) Obviously I can just edit that file, but is there a setup step I missed that would do this for me? I ask only because I don't want other things similar in nature to bite me down the road. TIA Greg ========= Greg Freemyer Internet Engineer Deployment and Integration Specialist Compaq ASE - Tru64 v4, v5 Compaq Master ASE - SAN Architect The Norcross Group www.NorcrossGroup.com
On Thu, Sep 05, 2002 at 03:26:21PM -0400, Greg Freemyer wrote:
All,
My machine is accumulating junk in /tmp /var/tmp
I found /etc/cron.daily/suse.de-clean-tmp which is designed to handle this.
It is not running currently because I don't have it enabled in /etc/sysconfig/cron (why not??)
Obviously I can just edit that file, but is there a setup step I missed that would do this for me?
I ask only because I don't want other things similar in nature to bite me down the road.
Greg, you need to change MAX_DAYS_IN_TMP variable to non-zero value. It's in /etc/rc.config on pre-8 system and in /etc/sysconfig/cron on SuSE 8 Regards, -Kastus
On Thu, 5 Sep 2002 15:26:21 -0400 Greg Freemyer <freemyer@NorcrossGroup.com> wrote:
My machine is accumulating junk in /tmp /var/tmp I found /etc/cron.daily/suse.de-clean-tmp which is designed to handle this.
The halt.local file can be useful in some desktop situations for clearing out directories. Just put a script in halt.local and it will clear everything out if you shutdown the machine. Machine reboot on a desktop, is a very good "end of session" marker. Usually you want to keep those temp files until your current session is done. Here are a couple of scripts I use: ############################################################ #!/usr/bin/perl use warnings; #I already had something similar. It actually deletes files older than 45 #minutes. Just change .03124 to a "3" for 3 days. # 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 $_; } } ############################################################### This one is for wiping out the histories, good if you are entering passwords on the commandline alot, and don't want them saved in the histories. ######################################################### #!/bin/sh cd /root/.mc cat /dev/null > history cd /root cat /dev/null > .bash_history cd /home/zentara/.mc cat /dev/null > history cd /home/zentara cat /dev/null > .bash_history ########################################################### -- use Perl; #powerful programmable prestidigitation
participants (3)
-
Greg Freemyer
-
Konstantin (Kastus) Shchuka
-
zentara