/tmp/ out of disk space

Posted on 2008-02-04
Medium Priority
Last Modified: 2013-12-16

I have a dedicated Linux (CentOS) web server located 2000 miles away that I have full root SSH access to.

I had some trouble uploading files from a web-based form to one of my websites so I checked out my diskspace using df.

It shows /tmp at 100% and /var/tmp at 100%.

Is this a problem?  What should I do?  

Is this a GOOD or BAD idea?

        rm -rf /var/tmp/*
        rm -rf /tmp/*

/dev/sdb5             10317828    767396   9026316   8% /
/dev/sdb1               101086     30267     65600  32% /boot
none                   1037156         0   1037156   0% /dev/shm
/dev/sdc1            241083332     94284 228742704   1% /disk2
/dev/sdb7            206927892  35177592 161238976  18% /home
/dev/sdb8              1035660   1034700         0 100% /tmp
/dev/sdb3             10317860   4532016   5261724  47% /usr
/dev/sdb2             10317860   2074264   7719476  22% /var
/tmp                   1035660   1034700         0 100% /var/tmp

Open in new window

Question by:hankknight
LVL 46

Accepted Solution

Kent Olsen earned 2000 total points
ID: 20817049
Hi hankknight,

If the system is configured correctly, it will still run after such a blanketing purge.

But, there's always a chance that some system routine or application as installed in such a way that space from /tmp was "borrowed".  That could be devastating.

Keep in mind that any applications that are currently trying to allocate more space on /tmp are simply in a "wait" state.  When space becomes available, the tasks will resume.  Also realize that if all of the files on /tmp are currently open to tasks awaiting space, deleting them ONLY removes their catalog entry.  They are not actually purged until the task that has them open closes them.  Either explicitly or by terminating.

Personally, I'd search for a small gun.  See if there are some backup files or other such items that can be deleted.  Anything ending in .tar, .log etc, on /tmp should be fair game.

Good Luck,
LVL 16

Author Comment

ID: 20817415
Thanks!  I found a 2 gig .txt file in there that was doing nothing.

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This installment of Make It Better gives Media Temple customers the latest news, plugins, and tutorials to make their Grid shared hosting experience that much smoother.
Can you run Linux on a Windows system?  Yep.  Here's how.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question