Results 1 to 6 of 6
Hello Guys,
Just a quick query really, I notice that when the box is reset it clears the /tmp directory, is there a way of adding another directory so that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-28-2006 #1Just Joined!
- Join Date
- Jun 2006
- Posts
- 49
Clearing the /tmp Directory
Hello Guys,
Just a quick query really, I notice that when the box is reset it clears the /tmp directory, is there a way of adding another directory so that it gets cleared when the box is shutdown or reboots?
Thanks,
Rob
- 06-28-2006 #2Linux User
- Join Date
- Jun 2006
- Posts
- 311
Hi SirRawlins,
You can add the line to remove the contents of the directory you want, in the S01reboot file in /etc/rc.d/rc6.d
Just take care not to remove any other line in the file. Backup the original copy, before you start editing rc6.d, if you wish to be on a safer side.
With Regards,
Thinker
- 06-28-2006 #3Linux Enthusiast
- Join Date
- Jun 2005
- Posts
- 668
I'm not sure /tmp gets cleared on boot automatically in the initscripts. I remember having to add it myself
What thinker replied with wont work, there is no such file
"You can add the line to remove the contents of the directory you want, in the S01reboot file in /etc/rc.d/rc6.d"
looks like he's getting the systemV layout confused with slackwares BSD init layout
if you want it to clear the 'other' directory on boot you could add something similar to this, in /etc/rc.d/rc.local
thats similar to what I have on my system to clear /tmp, the /dev/null part simply throws away the output or any error codes.Code:echo "Emptying /tmp" rm /tmp/* -rf &1>2 > /dev/null echo "Emptying /tmp/blech" rm /tmp/blech/* -rf &1>2 > /dev/null
- 06-28-2006 #4Linux User
- Join Date
- Jun 2006
- Posts
- 311
Hi kern and SirRawlins,
Sorry about that. I did not realize at the time of posting that SirRawlins was refering to a Slackware. I should have checked on which forum it was posted.
Thanks kern, for pointing out the mistake.
With Regards,
Thinker
- 06-28-2006 #5Just Joined!
- Join Date
- Jun 2006
- Posts
- 49
The Thinker: Thanks for your effort buddy.
Kern: Awsome, as always, tell the boss i reccomend you for promotion and a big fat payrise.
Rob
- 06-28-2006 #6Linux Enthusiast
- Join Date
- Jun 2005
- Posts
- 668
heh, I only started 3 months ago at my job, doubt a payrise is any time soon.
Originally Posted by SirRawlins


Reply With Quote
