DU Command

HSI Version:

All

Purpose:

DU gives the number of bytes contained in all files and, recursively, directories within each specified directory or file name. If name is missing, "." is used.

Aliases:  

Command Format:

du [-?] [-a] [-b] [-e] [-k] [-s] [-w] [ path ...]

Options:

-a : if specified, causes an entry to be printed for each file.

-b : if specified, only counts files written since the specified date. The date is of the form "yyyy/mm/dd".

-e : if specified, only counts files written before or on the specified date. The date is of the form "yyyy/mm/dd".

-k : if specified, prints values in kilobytes (1k = 1024). Default is 512 byte blocks.

-s : if specified, causes only the grand total to be printed.

-w : if specified, only counts files written within the last 'n' days

Keywords:

 

Usage Notes:

If neither -s or -a is specified, an entry is printed for each directory. An error occurs if both -w and (-b or -e) is specified in such a way that it is impossible for any files to qualify.

Example:

du -k

Related Command(s):