LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-30-2011, 07:52 PM   #1
VisionIncision
Member
 
Registered: Dec 2011
Location: Wiltshire, UK
Distribution: Slackware, Gentoo
Posts: 130

Rep: Reputation: 3
Safest way to clear /tmp


Hi all,
I am thinking about having my /tmp cleared automatically on shutdown. What is a safer option out of writing a script, or mounting it as a temporary filesystem?

Regards,
Jack
 
Old 12-30-2011, 08:03 PM   #2
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 688
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Hi,

One method is to put your commands in file
/etc/rc.d/rc.local_shutdown
and make it executable. See comments in rc.local

Jack
 
Old 12-30-2011, 08:38 PM   #3
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Make sure to double check syntax
 
Old 12-30-2011, 09:18 PM   #4
VisionIncision
Member
 
Registered: Dec 2011
Location: Wiltshire, UK
Distribution: Slackware, Gentoo
Posts: 130

Original Poster
Rep: Reputation: 3
Thanks for the responses, I shall battle this tomorrow. Its now 3.19, and I am SOOO tired. Don't want to be writing dodgy scripts now do I?

Regards,
Jack
 
Old 12-31-2011, 12:16 AM   #5
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
I mount /tmp using tmpfs, which only lives in ram. So, everything dies when I shutdown and ram dies.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Safest way to increase /tmp partition. VisionIncision Slackware 10 12-30-2011 05:23 PM
Can't login, says tmp directory full but tmp file is empty! Could be linked to MySQL? bethanlowder Fedora 7 09-25-2009 07:17 AM
Apache2 - have to restart apache2 process every 10 mins to clear /tmp directory.... levi dehaan Linux - Software 8 09-01-2009 06:34 PM
how do you clear tmp? AVD_ZM Linux - Software 4 02-14-2005 05:54 AM
/tmp fills up and doesn't clear itself cz1179 Linux - General 1 01-10-2005 03:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration