Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

RedHat disk space shows 100% use

I did a "df" and this is what I got:

[root@SRVWEB /]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda8              2063504   1990328         0 100% /
/dev/sda3               194449     43280    141129  24% /boot
none                    512596         0    512596   0% /dev/shm
/dev/sda7              1035660     32940    950112   4% /tmp
/dev/sda5             10072456   2757052   6803736  29% /usr
/dev/sda9             10072456   1316452   8244336  14% /var
/dev/sda2              2585332     52592   2401412   3% /home


What is the simplist way to figure out what directory/file is taking up all the space? Any other recomendations?

Thanks.
0
bfilipek
Asked:
bfilipek
  • 3
  • 3
  • 2
2 Solutions
 
BarthaxCommented:
du / | grep -v /boot | grep -v /dev |grep -v /tmp |grep -v /var | grep -v /home | less

du = disc usage
grep -v = ignore.
0
 
BarthaxCommented:
Actually, pipe at the end into:

... | sort -gr | less

That way to sort by numeric, largest first.
0
 
Cyclops3590Commented:
personally what I do is this (basically another take on what Barthax posted but with less output to go thru)
du -h --max-depth=1 / | grep -v /boot | grep -v /dev |grep -v /tmp |grep -v /var | grep -v /home | less
then cd into that directory use
du -h --max-depth=1
from then on until you find the culprit
my first thought would be do you store a lot of stuff in either the /usr/local or /root directories though
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
bfilipekAuthor Commented:
Well that shows / at the top using 9258869. What do you suggest to clean it up?
0
 
Cyclops3590Commented:
you need to delve deeper than that.  you still don't know the exact directory or file that is taking up so much space.
have you tried my idea yet and go level by level until you find the offending directory?
0
 
bfilipekAuthor Commented:
Well I did a little more poking around, and it shows that there is 42GB of free space that is not allocated to any of the devices. How can I make this free space available to use?
0
 
Cyclops3590Commented:
not really, the only thing you could try to do is find out which directory under the parent "/" that isn't currently its own partition is taking up the most room and then create,format, and mount the extra space as that directory
**NOTE: move the contents of that directory first, because after you mount the new partition, you won't see those files anymore, because the directory now points to a different place.
0
 
bfilipekAuthor Commented:
Thanks for your help. I have a directory that I filled up with a lot of stuff, so I cleaned it out and Im good to go.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now