-a : displays disk usage for each file specified, or displays the individual disk usage for each file in a directory. Contrast this flag with the -s flag.
-k : calculates the block count in 1024-byte units rather than the default 512-byte units.
-l : allocates blocks evenly among the links for files with multiple links. By default, a file with two or more links is counted only once.
-r : reports names of inaccessible files and directories. This is the default.
-s : displays the total disk usage for all specified files, or displays the total disk usage for all files in a directory. Contrast this flag with the -a flag.
-x : when evaluating file sizes, evaluates only those files that reside on the same device as the file or directory specified by the File parameter. For example, you may specify a directory that contains files on several devices. In this case, the -x flag displays block sizes for all files that reside on the same device as the directory.
Example to summarize the disk usage (number of disk blocks) of a directory tree and each of its subtrees, enter:
# du /home/fran
Example to display the disk usage (number of disk blocks) of each file, enter:
# du -a /home/fran
Example to display only the total disk usage of a directory tree, enter:
# du -s /home/fran
Example to display disk usage of all directories in a filesystem:
coolcommand: how to unlock a user account in Linux
Example: usermod -U username
[show me the details]
coolcommand: vxprint - how to display all the information about plexes in Veritas Volume Manager
Example: vxprint -l plex-80; vxprint -lp
[show me the details]
coolcommand: grep - how to search for strings or pattern in files
Example: grep -i -l -n -w string *
[show me the details]
coolcommand: how to include a function in awk to return a system command
Example: function getenv ( cmd ) { cmd | getline tmp_var; close(cmd); return tmp_var }
[show me the details]
coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts