destinyxi at yahoo.ca
Sun Nov 17 17:08:55 PST 2002
du - estimate file space usage
du [options] [file...]
POSIX options: [-askx] [--]
GNU options (shortest form): [-abcDhHklLmsSxX]
[--block-size=size] [--exclude=pattern] [--max-depth=n]
[--help] [--version] [--]
du reports the amount of disk space used by the specified
files, and by each directory in the hierarchies rooted at
the specified files. Here `disk space used' means space
used for the entire file hierarchy below the specified
With no arguments, du reports the disk space for the cur-
The output is in 512-byte units by default, but in
1024-byte units when the -k option is given.
The output is in 1024-byte units (when no units are speci-
fied by options), unless the environment variable
POSIXLY_CORRECT is set, in which case POSIX is followed.
-a Show counts for all files encountered, not just
-k Use 1024-byte units instead of the default 512-byte
-s Only output space usage for the actual arguments
given, not for their subdirectories.
-x Only count space on the same device as the argument
-- Terminate option list.
Show counts for all files, not just directories.
Print sizes in bytes, instead of kilobytes.
Print sizes in blocks of size bytes. (New in file-
Print a grand total of all arguments after all
arguments have been processed. This can be used to
find out the total disk usage of a given set of
files or directories.
Dereference symbolic links that are command line
arguments. Does not affect other symbolic links.
This is helpful for finding out the disk usage of
directories, such as /usr/tmp, which are often sym-
When recursing, skip subdirectories or files match-
ing pattern. The pattern may be any standard
Bourne shell file glob pattern. (New in file-
Append a size letter, such as M for binary
megabytes (`mebibytes'), to each size.
Do the same as for -h, but use the official SI
units (with powers of 1000 instead of 1024, so that
M stands for 1000000 instead of 1048576). (New in
Print sizes in kilobytes.
Count the size of all files, even if they have
appeared already (as a hard link).
Dereference symbolic links (show the disk space
used by the file or directory that the link points
to instead of the space used by the link).
Print sizes in megabyte (that 1,048,576 bytes)
Print the total for a directory (or file, with the
-a flag) only if it is n or fewer levels below the
command line argument; --max-depth=0 is the same as
the -s flag. (New in fileutils-4.0.)
Display only a total for each argument.
Report the size of each directory separately, not
including the sizes of subdirectories.
Skip directories that are on different filesystems
from the one that the argument being processed is
-X file, --exclude-from=file
Like --exclude, except take the patterns to exclude
from the specified file. Patterns are listed one
per line. If file is given as `-', patterns are
read from standard input. (New in fileutils-4.0.)
GNU STANDARD OPTIONS
--help Print a usage message on standard output and exit
Print version information on standard output, then
-- Terminate option list.
On BSD systems, du reports sizes that are half the correct
values for files that are NFS-mounted from HP-UX systems.
On HP-UX systems, it reports sizes that are twice the cor-
rect values for files that are NFS-mounted from BSD sys-
tems. This is due to a flaw in HP-UX; it also affects the
HP-UX du program.
The variable POSIXLY_CORRECT determines the choice of
unit. If it is not set, and the variable BLOCKSIZE has a
value starting with `HUMAN', then behaviour is as for the
-h option, unless overridden by -k or -m options. The
variables LANG, LC_ALL, LC_CTYPE and LC_MESSAGES have the
This page describes du as found in the fileutils-4.0 pack-
age; other versions may differ slightly. Mail corrections
and additions to aeb at cwi.nl. Report bugs in the program
to fileutils-bugs at gnu.ai.mit.edu.
GNU fileutils 4.0 1998-11 DU(1)
--- Denny B Peeples <dpeeples at sw.rr.com> wrote:
> I know this is off-topic, but I need an answer and maybe one of you guys/gals
> can give it to me.
> I need to find out how many Mb are in a directory and all of its
> subdirectories. Is there some command similar to df, but which operate on
> file systems instead of disks?
> The reason I want to know, is that I am seriously considering ditching my
> host distro. However, I would like to keep the stuff in my $HOME directory.
> I need to know how much stuff is there, so I can figure out where to store it
> while I reformat hda2 to reiserfs and then move my LFS4.0 onto it; then, I
> can put all of the stuff in $HOME back in it's place.
> Any suggestions?
> ATTACHMENT part 2 application/pgp-signature
Post your free ad now! http://personals.yahoo.ca
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message
More information about the blfs-support