Friday, October 19, 2007

DU, DF , Quota

du (abbreviated from disk usage) is a standard Unix program used to estimate the file space usage; space used under a particular directory or files on a file system.

Sum of directories in Kbytes:
$ du -sk *
2800344 directoryOne
4270554 directoryTwo

du -sh Documents/
409M Documents

disk usage of all subdirectories and files including hidden files within the current directory (sorted by filesize) :
$ du -sk .[A-z]* *|sort -n

df (abbreviated from disk free) is a standard Unix computer program used to display the amount of available disk space for filesystems on which the invoking user has appropriate read access, df is usually implemented by reading the mtab file or using statfs.
$ df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 32768 16016 52% 2271 14% /
/dev/hd2 4587520 1889420 59% 37791 4% /usr
/dev/hd9var 65536 12032 82% 518 4% /var
/dev/hd3 819200 637832 23% 1829 1% /tmp
/dev/hd1 524288 395848 25% 421 1% /home
/proc - - - - - /proc


/dev/hd10opt 65536 26004 61% 654 4% /opt

0 Comments:

Post a Comment

<< Home