Web Hosting Talk







View Full Version : how to check disk space


jolly
11-17-2001, 07:26 AM
How can we check how much disk space is used by which directory and subdirectory in *nix.

T_E_O
11-17-2001, 07:28 AM
You can do 'du -s directoryname' which will show you the total size of the files in that dir and its subdirs in kilobytes. You'll have to divide it by 1024 if you want to know how many megabytes it is.

jolly
11-17-2001, 07:30 AM
How to check from the root the directory structure and how much space is used by which directory and sub directory.

cyansmoker
11-17-2001, 08:08 AM
jolly:

du -ms /

bobcares
11-26-2001, 05:23 AM
Hi!
Try du -h
The -h is for human format. So you get the usage in K or M.
e.g. du -sh /root would give the usage for /root.

If you want to see the entire directories usage try

du -h / | less
to view on the terminal or try
du -h / > filename.txt
Later vi the fileand see the entire usage.

Have a great day :)

Regards
Amar