Home » Linux Command Reference » UNIX/LINUX Command – du

UNIX/LINUX Command – du

Last updated May 10, 2021

NAME

du—Summarize disk usage

SYNOPSIS

du [–abcklsxDLS] [—all] [—total] [—count-links] [—summarize] [—bytes] [—kilobytes] [—one-file-system] [—separate-dirs] [—dereference] [—dereference-args] [—help] [—-version] [filename…]

DESCRIPTION

This manual page documents the GNU version of du. du displays the amount of disk space used by each argument and for each subdirectory of directory arguments. The space is measured in 1K blocks by default, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.

OPTIONS

Options Description
–a, —all Display counts for all files, not just directories.
–b, —bytes Print sizes in bytes.
–c, —total Write a grand total of all of the arguments after all arguments have been processed. This can be used to find out the disk usage of a directory, with some files excluded.
–k, —kilobytes Print sizes in kilobytes. This overrides the environment variable POSIXLY_CORRECT.
–l, —count-links Count the size of all files, even if they have appeared already in another hard link.
–s, —summarize Display only a total for each argument.
–x, —one-file-system Skip directories that are on different filesystems from the one that the argument being processed is on.
–D, —dereference-args Dereference symbolic links that are command-line arguments. Does not affect other symbolic links. This is helpful for finding out the disk usage of directories like /usr/tmp where they are symbolic links.
–L, —dereference Dereference symbolic links (show the disk space used by the file or directory that the link points to instead of the space used by the link).
–S, —separate-dirs Count the size of each directory separately, not including the sizes of subdirectories.
—help Print a usage message on standard output and exit successfully.
—version Print version information on standard output, then exit successfully.

Related Posts

UNIX/LINUX Command – rsync

UNIX/LINUX Command – rsync

NAME rsync – a fast, versatile, remote (and local) file-copying tool rsync Command SYNOPSIS Local: rsync [OPTION…] SRC… [DEST] Access via remote shell:Pull: rsync [OPTION…] [USER@]HOST:SRC… [DEST]Push: rsync [OPTION…] SRC… [USER@]HOST:DEST Access via rsync...

UNIX/LINUX Command – strip

UNIX/LINUX Command – strip

NAME strip—Discard symbols from object files. SYNOPSIS strip [ -Fbfdname|–target=bfdname ] [ -Ibfdname|–input-target=bfdname ] [ -Obfdname|–output-target=bfdname ] [-Rsectionname|–remove-section=sectionname ] [ -s|–strip-all ] [-S|-g|–strip-debug ][-x|–discard-all...

UNIX/LINUX Command – expand

UNIX/LINUX Command – expand

NAME expand—Convert tabs to spaces SYNOPSIS expand [–tab1[,tab2[,…]]] [–t tab1[,tab2[,…]]] [–i] [—tabs=tab1[,tab2[,…]]] [–initial] [–help] [–version] [file…] DESCRIPTION This manual page documents the GNU version of expand. expand writes the contents of each given...

UNIX/LINUX Command – uuencode

UNIX/LINUX Command – uuencode

NAME uuencode—Encode a binary fileuudecode—Decode a file created by uuencode SYNOPSIS uuencode [-m] [ file ] nameuudecode [-o outfile] [ file ]… DESCRIPTION uuencode and uudecode are used to transmit binary files over transmission mediums that do not support other...

Follow Us

Our Communities

The Ultimate Managed Hosting Platform
Load WordPress Sites in as fast as 37ms!

0 Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

1 × one =

Shares