LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices



Reply
 
Search this Thread
Old 02-26-2007, 03:28 PM   #1
bendani
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Rep: Reputation: 0
hard disk is full because of what ?


hey
i got some weird problem
when im doing "df -h"
it says that im using 55G

and when im doing "du -sh" for all the dirs it says im using 26G
so where is all the other Gigabytes ?

Quote:
[root@host ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
74G 56G 15G 80% /
/dev/sda1 99M 22M 72M 24% /boot
none 1010M 0 1010M 0% /dev/shm
/dev/tmpMnt 769M 35M 696M 5% /tmp
Quote:
[root@host /]# du -chx --max-depth=1
3.6G ./var
27M ./etc
4.0K ./scripts
16K ./tmp
0 ./dev
8.0K ./selinux
0 ./sys
2.0K ./boot
18G ./home
1.6G ./usr
8.0K ./opt
0 ./proc
8.0K ./srv
402M ./ben
11M ./lost+found
8.0K ./mnt
5.3M ./bin
8.0K ./initrd
169M ./lib
16M ./sbin
8.0K ./media
8.0K ./misc
18M ./root
24G .
24G total
 
Old 02-27-2007, 06:37 AM   #2
biniou
Member
 
Registered: Feb 2007
Location: Belgium
Distribution: Ubuntu (7.04), (B)LFS (6.2), ...
Posts: 105

Rep: Reputation: 15
Hello !

df gives info on usage of the FileSystem, where du will give the size of selected directories/files ...

(and in fact, --max-depth=1 won't give an actual value, as it stops at directory depth of 1 ...)
 
Old 02-27-2007, 06:49 AM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
try running du -sh * from the root directory to get the size of each folder in /.
 
Old 02-27-2007, 07:13 AM   #4
bendani
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Original Poster
Rep: Reputation: 0
ok
so where is all the other data ?
my hard disk is getting full and i dont know what to do
 
Old 02-27-2007, 07:59 AM   #5
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Code:
for i in *; do cd $i && find ./ -type d | xargs du -sh | sort -g > ~/$i.size && cd ..; done
That will give you a crude idea of what's taking up a lot of space, although as I said, it's fairly inaccurate. It'll change into each of the folders in root, determine what the filesizes of each folder in those directories is, and then output them to a file name called <directory>.size. It'll help you narrow down where the largest directories are, and then you can work through those with the same commands. Maybe (hopefully) someone will come up with a better solution!

edit: run this command from the root directory!

Last edited by pwc101; 02-27-2007 at 08:01 AM.
 
Old 02-27-2007, 08:29 AM   #6
bendani
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Original Poster
Rep: Reputation: 0
you have got to understand
all the dirs togheter with all kings of "du" (du -sh for example) gets to max 26 GB
i dont know what is all the other 30 GB
how can i search for them
maybe its unmount or something like this ?
 
Old 02-27-2007, 03:11 PM   #7
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by biniou
(and in fact, --max-depth=1 won't give an actual value, as it stops at directory depth of 1 ...)
As I understand it, the man page says the --max-depth argument does not affect how far down du traverses to count used space, but only affects the depth of the final report. That is to say '--max-depth=1' will cause du's final report to display only the directory specified on the command line and one level of directories below it. Each directory reported will have an accurate accounting of the space consumed by that directory and all its subdirectories.

The df and du utilities look at different data to determine disk usage. In fact, I've seen this question, and variations of it, asked a number of times, but I can't find another thread at the moment. However, searching on Google for "df du different" gave this result on the first page: DF & DU report different size

And another support thread on the first page: "df" and "du" show different results

I don't know if they'll answer the question to your satisfaction, but they're a good start.
 
  


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
Disk full - external hard drive gaugain_ns Linux - Software 6 12-20-2006 02:08 AM
60GB laptop hard disk & 200GB external USB hard disk linux compatibility powah Linux - Hardware 0 03-07-2006 11:55 AM
/proc filesystem has too many 2gb files hard disk getting full sadun Suse/Novell 5 09-16-2005 08:40 AM
Linux corrupted due to full hard disk ravykanth Linux - Newbie 7 10-20-2003 07:42 PM
help! full hard disk! huffboy Slackware 4 10-11-2003 02:07 AM


All times are GMT -5. The time now is 10:25 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration