Show disk utilization or used space (UNIX)

The du command allows to display to total amount of disk space being used by all the files and directories.

du [Option]... [File]...

Options:

-B, --block-size=SIZE , use SIZE-byte blocks

-b, -- bytes , equivalent to '--apparent-size --block-size=1'

-c, --total, produce a grand total

-D, --dereference-args, dereference FILEs that are symbolic links

--files0-from=F, summarize disk usage of the NUl-terminated file names specified in file F

-H like -si, but also evokeds a warning; will soon change to be equivalent to -dereference-args (-D)

-h, --human-readable , print sizes in human readable format (e.g., 1K 234M 2G)

--si like -h, but use powers of 1000 not 1024

-k, like --block-size=1K

-l, --count-links, count sizes many times if hard linked

-m , like --block-size=1M

-L, --dereference don't follow any symbolic links

-0, --null , end each output line with 0 byte rather than newline

-S, --separate-dirs , do not include size of subdirectories

-s, --summarize, display only a total for each argument

-x, --one-file-system, skip directories on different file systems

-X FILE, --exclude-from=FILE, Exclude files that match any pattern in FILE

--exlude=PATTERN , Eclude files that match Pattern.

--max-depth=N, print the total for a direcory only if it is N or fewer levels below

-time, show time of the last modification of any file in the directory, or any of its subdirectories

--time-word, shot time as word instead of modification time

--vertion, output version information and exit

Patterns:

Parrent is a shell pattern. The pattern ? mathces any one character whereas * mathces any string.

Example :

du -sh

Displays the total amout of space being used by all the files and directories in your current directory, in human-readable format.

No comments:

Recent Posts