You are not logged in.
I just found /var/tmp containing a few files that should have been deleted but for some reason where sticking around. One of them was a recorder session from a few months back, another was a folder from KDE when I downloaded it just to check it out. (Had since removed it all), and the last was a pair of files from vi about a .pacnew from laptop.conf from June.
I am a little confused. I thought all of the tmp folders were cleared out at some point in the startup and shutdown process. These tmp files were eating up nearly 1/2 a gig of space on a fairly limited root. Is there any way to prevent this from happening again, or do I just need to make a cron to delete the contents of this folder every couple of weeks?
I keep getting distracted from my webserver project...
huh? oooh... shiny!
Offline
# grep -R tmp /etc/rc.*
/etc/rc.shutdown:# Write to wtmp file before unmounting
/etc/rc.shutdown:/bin/umount -a -r -t noramfs,notmpfs,nosysfs,noproc -O no_netdev
/etc/rc.sysinit:/bin/mount -n -t tmpfs none /dev -o mode=0755
/etc/rc.sysinit:/bin/rm -rf /tmp/* /tmp/.* &>/dev/null
/etc/rc.sysinit:: > /var/run/utmp
/etc/rc.sysinit:/bin/chmod 0664 /var/run/utmp
/etc/rc.sysinit:/bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix
/etc/rc.sysinit:/bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix
/etc/rc.sysinit:if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
/etc/rc.sysinit: /bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
/etc/rc.sysinit:if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
/etc/rc.sysinit: /bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
A cursory look indicates only:
/etc/rc.sysinit:/bin/rm -rf /tmp/* /tmp/.* &>/dev/null
So /var/tmp does not appear to be cleared at startup. You can add a line to do this to /etc/rc.local if you want.
Offline
So /var/tmp does not appear to be cleared at startup. You can add a line to do this to /etc/rc.local if you want.
I would not do that.
http://www.pathname.com/fhs/pub/fhs-2.3 … RVEDBETWEE
/var/tmp : Temporary files preserved between system reboots
Purpose
The /var/tmp directory is made available for programs that require temporary files or directories that are preserved between system reboots. Therefore, data stored in /var/tmp is more persistent than data in /tmp.Files and directories located in /var/tmp must not be deleted when the system is booted. Although data stored in /var/tmp is typically deleted in a site-specific manner, it is recommended that deletions occur at a less frequent interval than /tmp.
It seems better to keep an eye on it than blindly delete it...or delete it at your own risks!
Last edited by dobedo (2009-11-09 11:10:10)
Offline
Maybe set a cron job to delete it monthly or something...But seriosuly, on one of my boxes that I have access to now is like 1MB.
Offline
aaahhhh so that's its purpose, a semi-tmp folder. I think I'll cron that one for once a month. It doesn't seem to fill very fast on my system, so now that I know what it is for, I can treat it properly.
Thanks guys/gals!
I keep getting distracted from my webserver project...
huh? oooh... shiny!
Offline