Du command
From RZWiki
A CLI program available on most Linux and Unix platforms; used to display usage information for files and folders on a file system.
Contents |
Usage Syntax
du [options]
The most common options are:
- -h - display size data in a human readable format, Kb, Mb etc.
- -s - summarise, display only the total usage for all files and directories
- -a - display counts for all files and directories (only currnet directory is displayed by default)
- --max-depth=value - display information for sub-directories this depth below the current directory
The -a and -s are mutually exclusive
Usage Examples
du -hs - Display summary information only, in human readable format
du -h - Display information for this directory only, in human readable format
du -h --max-depth=1 - Display information for files in this directory and any sub-directories, to a maximum depth of 1
du -h | sort -n - Display information for this directory only, in human readable format, sort display order by size
Linux Usage Notes
With most Linux or Unix commands;
- Non root users may need to prefix commands with the sudo command, for example: sudo chmod 644 *
- Brief help can be displayed using the -h or --help parameter, for example: chmod --help
- A full command manual can be displayed using the man command followed by the command name, for example: man chmod
- Sometimes 'info' pages are used instead of or to provide more information than man pages; for example: info chmod
- Version information can normally be display using the -v, -V or --version parameter, for example: chmod --version. However, this paramater is also frequently used to display verbose output.
noinclude/noinclude
Typical Output
noinclude/noinclude
BigIP 1500 running v9.3.0; du -hs
7.5G
BigIP 1500 running v9.3.0; du -h
[...Lots of output omitted...] 4.0K ./dev/dri 32K ./dev/i2o 32K ./dev/ida 4.0K ./dev/inet 4.0K ./dev/input 4.0K ./dev/logicalco/bci 4.0K ./dev/logicalco/dci1300 12K ./dev/logicalco 4.0K ./dev/net 0 ./dev/pts 4.0K ./dev/raw 68K ./dev/rd 4.0K ./dev/scramdisk 60K ./dev/shm 8.0K ./dev/sx8 4.0K ./dev/usb 4.0K ./dev/video 4.0K ./dev/video1394 4.0K ./dev/watchdogs 500K ./dev 916K ./command 9.3M ./opt/F5/sccp 9.3M ./opt/F5 9.3M ./opt 0 ./subdomain/control 0 ./subdomain 7.5G .
Related Files
The du executable is normally found here: /usr/bin/du
Related Commands
The df command is used to display usage information for file systems on the device.
Related Articles
Information on Linux commands
Information on Cisco commands
Information on Vyatta commands
Information on Extreme commands
Information on F5 BigIP commands
Information on Zebra commands
Information on Secure Platform commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands
(replacing the # with an @) |






