LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-16-2013, 04:34 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157
Problem with full /tmp


Hi,

I have a strange problem with the /tmp directory on my Slack64 workstation.

Code:
[root@alphamule:tmp] # pwd
/tmp
[root@alphamule:tmp] # rm -rf *
-su: /usr/bin/rm: Liste d'arguments trop longue
The last error message means too many arguments.

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?
 
Old 10-16-2013, 04:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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
 
1 members found this post helpful.
Old 10-16-2013, 07:46 AM   #3
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157
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
 
Old 10-16-2013, 08:31 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if they come back, you can try something like lsof to see what process has the filehandle open.
 
1 members found this post helpful.
Old 10-16-2013, 12:00 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I personally use
Code:
*/15 * * * * /usr/sbin/tmpwatch --atime 1 /tmp --exclude=/tmp/SBo/ > /dev/null 2>&1
to keep things nice and neat.

6.4M /tmp
 
Old 10-16-2013, 12:23 PM   #6
Bazzaah
Member
 
Registered: Mar 2007
Distribution: Slackware64-current, Slackware64 14
Posts: 331

Rep: Reputation: 50
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
 
Old 10-16-2013, 01:43 PM   #7
vivanguarda
Member
 
Registered: Sep 2008
Location: RJ-Brazil
Distribution: Slackware
Posts: 181

Rep: Reputation: 5
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 ?

Last edited by vivanguarda; 10-16-2013 at 01:46 PM.
 
1 members found this post helpful.
  


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't login, says tmp directory full but tmp file is empty! Could be linked to MySQL? bethanlowder Fedora 7 09-25-2009 07:17 AM
/tmp directory is full? Moses420ca Linux - Newbie 13 01-21-2005 07:48 PM
/tmp is full... benny Linux - Newbie 4 12-10-2003 04:59 AM
/tmp/ is full (so it sayz) the Linux - Newbie 5 04-03-2003 08:15 AM
My /tmp is full FNC Linux - General 3 06-05-2001 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:18 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
Open Source Consulting | Domain Registration