1833873 Members
3194 Online
110063 Solutions
New Discussion

du related information

 
Santhikumari
Advisor

du related information

Hi,

Could you please explain me abou bellow u/p usage.


du -kx
2 ./xpg4
3129 ./X11
0 ./posix
0 ./cue.etc
18990 .
4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: du related information

Well, there it tells you the sizes in Kb of the 4 directories. And the total of 19 Mb in ".".
Prashanth Waugh
Esteemed Contributor

Re: du related information

Hi Santhikumari,

du -kx is used for checking the directries size inside the fs. this will helpful when any filesystem is growing. suppose /var is 95%. then u can use
#du -kx /var | sort -nr | more

k for kilobytes

it will show the which directory consuming more space inside the file system.

Reagrds
Prashant
For success, attitude is equally as important as ability
Santhikumari
Advisor

Re: du related information

thaks to Dennis and Prashanth.
Bill Hassell
Honored Contributor

Re: du related information

I call the du command the directory utilization command. With no options, du shows you the size of all directories (in 512 byte blocks) at the current level and below in a somewhat random order. The -k option changes blocks to 1 Kbyte units. The -x option stops the listing whenever a directory is actually a mountpoint, very important when looking at the / directory.

The most useful command line is to sort the list by size. That way, you see the largest directories at the top:

du -kx /home | sort -rn


Bill Hassell, sysadmin