coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Sunday May 27, 2012


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?
Create an account

Who's Online
We have 22 guests online

Newest Member

beyondimagem

Hit Counter
9133538 Visitors

cool Statistics
coolcommands:1330
Categories:83
Total queries:595500
Members:16437





Category Search coolcommands.com
Select Category:


coolcommand

du - how to get disk usage summary
Description

To get disk usage summary:

# du [ -a | -s ] [ -k ] [ -l ] [ -r ] [ -x ] [ File ... ]

where:

-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:

# du -sk *
Example

du -sk *

Return to search results

Random coolcommands

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



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1152
audet37
kah00na32
Mariom24
lebjf00014

Top 5 Searches

Category Solaris49379
Category AIX46267
Category General UNIX43933
solaris22927
aix22116

Terms of Use
Privacy
Contact


 
coolcommands.com © 2012. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum