Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk size and usage 2

Status
Not open for further replies.

sandeepmur

Programmer
Dec 14, 2003
295
PT
How can I effectively find out the Total Disk size, Total disk usage and list of all directories with the largest amt of disk space consumed ?

I tried using du and df commands but getting rather confused.

thnx in adv,
 
Hi again,

I did a ftbc01/home>df -t and the output regarding the home dir was:
/home (/dev/vg00/lvol5):504656 blocks 7937 i-nodes
6160384 total blocks 9248 total i-nodes
5651888 used blocks 1311 used i-nodes
0 percent minfree

I figure the above indicates I using approx 5.6 Gb of the allocated 6.1 Gb.

BUT when I do a ftbc01/home>du , the output in the last line which indicated the total space consumed as 3569008 Kb or approx 3.56 Gb !

So, where is the approx. 2 GB space ??

thnx,


 
I find the following commands useful when trying to do this sort of thing:
df -k
which produces a listing using 1024 bytes (instead of 512 byte blocks - which I find hard for mental arithmetic).
du -sk /<filesystem>/* | sort -n
which produces a sorted list (by size) of the contents of /<filesystem> .
find / [-mount] -size +1000000c
which produces a list of files greater than 1 million bytes (the -mount is optional, NB: if you use 1000000c without the + the list contains those files that are exactly 1 million bytes no bigger or smaller)

I hope that helps.

Mike
 
You don't specify the *nix, but AIX 5.2 (the only version I have) gives -m and -g options to df, for megabytes and gigabytes respectively. Much more intelligible than the old basic df and df -k. What variety of unix are we talking exactly?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top