LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-27-2009, 04:22 AM   #31
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195

Quote:
Originally Posted by unSpawn View Post
Yes but that's not my point. It's about what tasks one may expect a system to perform on bootup. Yours wipes everything, without regard for anything and without a user being able to stop it.
Yes -- it wipes everything.

I'm not sure what you are saying with "without a user being able to stop it". Assuming no show-stopping errors, that is the case with all boot processes -- or are you saying it should be configurable?

I vaguely recall that wiping everything was the default behaviour of some UNIX implementations but I can't find any references to back that up.

The only other Linux I have inspected is ubuntu 8.04 desktop and its default behaviour is to remove everything except the following if they are owned by root
  • lost+found
  • quota.user
  • aquota.user
  • quota.group
  • aquota.group
  • .journal
  • .clean
  • ...security*
"lost+found" make a lot of sense (!); ".clean" is the cleanup routine's own marker file; "*quota*" will presumably only be relevant if /tmp is a mount point and quotas are implemented; I don't know about ".journal" and "...security" but have never seen them.

In my initial post I asked "are there any reasons for not deleting everything in /tmp as soon as it is mounted?" On the basis of further information I would now like to change that to "Are there any reasons for not deleting everything in /tmp (except, if it is a mount point, "lost+found" and, if it is a mount point, quota files if quotas are implemented) as soon as it is mounted and writeable?
 
Old 10-27-2009, 12:33 PM   #32
mejohnsn
Member
 
Registered: Sep 2009
Posts: 174

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Your post is incomplete: if unsure best post complete, unedited cronjobs. The "$flags" variable is set at the top of the cronjob and holds the switches 'tmpwatch' uses to determine what checks to perform and what attributes to look at. This could for example be flags="-umc" to only look at (file) access, modification and change time or flags="-mMds" to perform a 'fuser' check on files (file in use or not), check file and directory modification time, and not remove directories.



First thing to check is what kind of file "/tmp/virtual-mejohnsn.VRsASs" is (run 'file' on it). To test removal for this purpose add the "-t" flag. This will make 'tmpwatch' go through the motions but without actually deleting things. If the file is not a regular file add "-a". Now to test things run:
Code:
/usr/sbin/tmpwatch -umcMdsta -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 10d /tmp 2>&1|grep -i vrsass
Tell us if the file does not show up.
Thanks for the detailed response. But my, how things have changed! Now the file I named before, 'virtual-mejohnsn.VRsASs', has been deleted. It is as if the '10d' was read in hex instead of decimal

But now there is one similar to it, named virtual-mejohnsn.LfBHaV. 'file' reports that it is a directory.

Somehow,I have to consider the following line more informative though:
drwx------ 2 mejohnsn mejohnsn 4096 2009-10-26 13:35 virtual-mejohnsn.LfBHaV/

Now if I change your suggested code to read:
Code:
/usr/sbin/tmpwatch -umcMdsta -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 10d /tmp 2>&1|grep -i lfbhav
then I get nothing, which is what I expect, since 10-26 is only yesterday.
 
Old 10-28-2009, 05:28 PM   #33
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Maybe run 'touch' on it to artifically age it to the point it should get deleted or chage "10d" to something more convenient for testing purposes?
 
Old 10-29-2009, 02:20 AM   #34
mejohnsn
Member
 
Registered: Sep 2009
Posts: 174

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Maybe run 'touch' on it to artifically age it to the point it should get deleted or chage "10d" to something more convenient for testing purposes?
This approach is not throwing any light on the situation. Now there is no 'virtual-mejohnson.L etc. But there is a virtual-mejohnsn.Z4sZZE dated 10/22 (6 days ago).

But running
Code:
 /usr/sbin/tmpwatch -umcMdsta -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix 5d /tmp 2>&1|grep -i Z4sZZ
did not delete it.

What are these virtual-mejohnsn.Z4sZZE files, anyway?
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I delete files in /mnt/tmp? and Files in the trash can will not delete? M$ISBS Slackware 15 10-03-2009 12:56 AM
script to delete tmp files Iyyappan Linux - Newbie 8 08-02-2009 07:40 AM
Slackbuild files in /tmp. Ok to delete? Romanus81 Slackware 9 11-05-2008 10:45 PM
How To Delete tmp Files In FC5 zenarcher Fedora 3 09-07-2006 01:51 AM
can i delete /tmp files? demmylls Linux - General 1 03-01-2004 11:14 AM


All times are GMT -5. The time now is 12:04 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration