Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-06-2012, 06:03 PM   #1
LQ Newbie
Registered: Oct 2011
Posts: 26

Rep: Reputation: Disabled
Help me find where my drive space went

I have an apache server hosting a small website (db on another system). Disk free shows:

me@server:/$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
                      11550640  10970980         0 100% /
none                   2022552       172   2022380   1% /dev
none                   2029676         0   2029676   0% /dev/shm
none                   2029676        36   2029640   1% /var/run
none                   2029676         0   2029676   0% /var/lock
none                  11550640  10970980         0 100% /var/lib/ureadahead/debugfs
The thing is, I cannot find where all my drive space got used. It is just a 12 GB drive, but it is hosting a very small site. I ran
du -k | sort -nr | more
And get the following as the top results
857900 .
411784 ./usr
231224 ./var
167596 ./lib
166772 ./var/lib
136444 ./usr/share
If I am reading this right, the whole file system is 857900 KB, or well under the 12GB allocated to the drive.

Is there another place I should be looking that might cause this?
Old 01-06-2012, 06:28 PM   #2
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi DrinkinHomeBrew,

Run the following command and I think you will get what you are looking for:

cd /
du -ah | sort -nr > /output.log
head output.log
or you can use

less output.log
Old 01-06-2012, 06:54 PM   #3
Senior Member
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,857
Blog Entries: 36

Rep: Reputation: 457Reputation: 457Reputation: 457Reputation: 457Reputation: 457
If you want to step through the folders a little more then you can use du for that also.

cd /
du -shc *
cd very_large_folder
du -shc *
#rinse and repeat

Last edited by sag47; 01-06-2012 at 06:56 PM.
Old 01-07-2012, 01:05 AM   #4
Registered: Nov 2010
Location: Moradabad
Distribution: Redhat,Centos
Posts: 31

Rep: Reputation: 1

first of all login through root user in graphical mode and check directory which comes under / it might possible that any directory or files has large size and second thing check your root,s home directory it also comes under / and you can check through CLI.

# cd /
# du -sh directoryname(example)
# du -sh abc
and also check hidden files

# ls -a

hope it will work and help you out.

Thanks $ Regards

Old 01-07-2012, 02:02 PM   #5
LQ Newbie
Registered: Oct 2011
Posts: 26

Original Poster
Rep: Reputation: Disabled
Ok, thanks for the suggestions.

On a hunch I decided to take the server out of the pool and reboot it. That did the trick.

me@server:~$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
                      11550640   1018036   9945852  10% /
none                   2022552       168   2022384   1% /dev
none                   2029676         0   2029676   0% /dev/shm
none                   2029676        36   2029640   1% /var/run
none                   2029676         0   2029676   0% /var/lock
none                  11550640   1018036   9945852  10% /var/lib/ureadahead/debugfs
I did do a df before rebooting at it was at the same state of 0 bytes free. Not really sure what was going on, but hopefully I'll have better skills in a few months to debug again when it happens.


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
use free space to extend the space of a drive ashu2188 Linux - Newbie 4 07-05-2011 01:27 PM
Find used drive space IceTerminal Linux - Software 6 07-01-2009 02:58 AM
best way to find out what is taking up the bulk of your hard drive space? dr_zayus69 Linux - Software 2 06-30-2005 08:51 AM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 01:44 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 06:10 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration