Log in Go to the main page Page Discussion History Go to the file list Go to the site toolbox

Du command

From NetworkCommands


Image:Tux_64x64.png

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

Image:Vm-power-on-medium.png 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

Image:Vm-power-on-medium.png 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

Image:accessories-text-editor-v2-medium.png 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


Image:utilities-terminal-medium.png 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    .

Image:Folder-medium.png Related Files

The du executable is normally found here: /usr/bin/du

Image:icemon-medium.png Related Articles

Information on Linux commands Image:Tux-small.png

Information on Cisco commands Image:Cisco-logo-small.png

Information on Vyatta commands Image:Vyatta-logo-small.png

Information on Extreme commands Image:Extreme-logo-small.png

Information on F5 BigIP commands Image:F5-logo-small.png

Information on Zebra commands

Information on Secure Platform commands

Information on Blue Coat SGOS commands

Information on Nokia IPSO commands


Image:internet-group-chat-small.png We really do appreciate all feedback so please do send your comments, suggestions or corrections to steve#networkstuff.eu (replacing the # with an @)



Site Toolbox:

Personal tools
This page was last modified on 27 October 2008, at 21:03. - This page has been accessed 27 times. - Disclaimers - About NetworkCommands
Powered by MediaWiki