Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-28-2004, 02:31 PM   #1
LQ Newbie
Registered: Feb 2004
Posts: 17

Rep: Reputation: 0
tmp directory being deleted

I'm running fedora. How do the files in tmp get deleted? And how can I prevent certain files or directories from being deleted?

Old 10-28-2004, 03:31 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
It's usually part of a startup-script, in Slack it would live
in /etc/rc.d/rc.M (but Slack leaves the house-keeping
to root ;}) ...

Just grep through the /etc directory ...

Old 10-28-2004, 03:54 PM   #3
Senior Member
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Usually it is a command called tmpwatch that runs and cleans up files in the /tmp directory that hasn't been accessed more recently than 2 week or so.
After all temporary files are just that.
Old 10-30-2004, 07:42 PM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
If there is something in particular that you want to save, you could copy it to your homedir.

If it is an item that won't change, you could try setting the sticky bit for the directory, or use the 'setattr' command to set the immutable option. ( assuming that fedora has this installed, and you are using an ext2 filesystem )

For XFS filesystems, the commands are 'getfattr' and 'setfattr'.

Last edited by jschiwal; 10-30-2004 at 07:46 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
getting files deleted on /tmp ines Linux - General 13 01-28-2005 04:35 AM
/tmp files being deleted new@linux Linux - Newbie 2 12-30-2004 02:51 PM
Anything in the SuSE 8.2 tmp directory that can't be deleted? alfredh Linux - Newbie 3 12-14-2003 04:41 AM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 04:04 AM
/tmp directory Bobmeister Linux - General 3 06-01-2003 05:32 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:34 AM.

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