SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yeah you're right. I'm not sure the man page makes sense in that respect.
Shouldn't it be -atime rather than -mtime though? As the hidden files won't be modified by rc.local therefore won't be spared when your code cleans /tmp. But they will presumably be "accessed" by the rc.local script when it checks if they are present or not.
Or am I misunderstanding ?
AFAIK find resets atime on files and directories it accesses. -atime will, of course not work on file systems mounted with noatime which is commonly used for performance.
Cleaning /tmp from rc.local will also remove any quota data, along with anything created as a result of running all the other boot scripts.
If /tmp is not on the / file system then it cannot be cleaned at the rc.S position described in the OP; it must be cleaned later, ideally just before "# Enable swapping again. This is needed in case a swapfile is used"
Last edited by catkin; 12-27-2010 at 09:34 PM.
Reason: quality improvement program (QIP)
I realized that I'm being an idiot... of course it didn't work at that point. I have /tmp in a separate LVM partition. I'm gonna try placing it elsewhere and get back to you.
no, it wont...
You can do a simple check with "ls -l --time=atime"
Thanks for the correction I would have tested if all my file systems were not mounted with noatime. Given that atime is not restored by find, atime is even less use than I thought it was! AFAIK tar and cpio do restore atimes ... ?
Can't speak for tar, but with cpio you have to specify the "-a" option to preserve the access time.
edit:
At least that's according to the info page, however, from a quick test, specifying -a on a cpio -o causes the ctime to change, and not specifying -a doesn't seem to affect the atime, so the info page may be wrong on that one.
That is, execute find on file in directory, file atime, mtime and time do not change.
All that being as it is, I really like Toods approach -- blow the entire thing away at shutdown. Methinks that's what I'm going to do and forget about all this other stuff.
Yep, the tmpfs approach is a good way to do this and I've used it in the past. You can always use /var/tmp for stuff that won't fit in memory should you need to.
In fact, a lot of the stuff that people do in /tmp probably belongs in /var/tmp anyway.
In spite of having solved in this topic I 'd like to deep knowledge about possible problems deleting /tmp , /sys/tmp/, cached and log rotations arquives .
I use slackware 13.1 exploring root and another user called: “normal”. Right after a fresh install there are inside /temp : kde-normal/, kde-root/, ksocket-normal/ ksocket-root/, kde-socket. Is safe to delete it? And what should I do to delete log arquives?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.