Problem with full /tmp
Hi,
I have a strange problem with the /tmp directory on my Slack64 workstation. Code:
[root@alphamule:tmp] # pwd Something seems to have spammed my /tmp directory. According to du -sh /tmp, there's about 900 MB of files in there. No idea where that's coming from. Any idea how I can clean up this mess? |
you could start by just looking at what files are there, but when the commandline is too long, you can use find to process one file at a time:
find /tmp/whatever -exec rm -f {}\; or xargs: ls /tmp | xargs rm |
Thanks, that helped! Though it took about half an hour to complete deletion. On a quad-core with 4 GB RAM.
There was a shitload of /tmp/509567493afdc67 and similar files. I don't have the slightest idea what application spewed these out. Hmmmm. cheers, Niki |
if they come back, you can try something like lsof to see what process has the filehandle open.
|
I personally use
Code:
*/15 * * * * /usr/sbin/tmpwatch --atime 1 /tmp --exclude=/tmp/SBo/ > /dev/null 2>&1 6.4M /tmp |
In addition to /dev/shm, you can also add a line to fstab to make your /tmp tmpfs and your /tmp will be cleared on reboot.
I'm sure you know that already, just sayin' Code:
tmpfs /tmp tmpfs defaults 0 0 |
Itīs an interesting matter. Can I suggest another possibilities?
1)Using /rc.d/rc.local_shutdown ( /usr/bin/find /tmp -mindepth 1 -maxdepth 1 -print0 | xargs -0r /bin/rm -rf ) http:ww.linuxquestions.org/questions/slackware-14/command-to-clean-tmp-at-shutdown-417547093//w4/ 2)There are a pair of excellent Mr. Woodsman scripts. If you will use kde4 you should some adpatations, but it was used a lot in kde3. And tmpfs has memory quantity questions, insnīt ? |
All times are GMT -5. The time now is 10:05 AM. |