Du command
From NetworkCommands
A command line 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
Linux Usage Notes
With most Linux or Unix commands;
- Brief help can be displayed using the option/keyword: -h or --help, 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 be display using the option/keyword: -v or --version, for example: chmod --version
Typical Output
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 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







