svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
du(1)
du(1) User Commands du(1)
NAME
du - summarize disk usage
SYNOPSIS
/usr/bin/du [-dorx] [-a | -s] [-h | -k | -m] [-H | -L]
[--scale[=item1,item2,...]] [file ...]
/usr/xpg4/bin/du [-dorx] [-a | -s] [-h | -k | -m] [-H | -L]
[--scale[=item1,item2,...]] [file ...]
DESCRIPTION
The du utility writes to standard output the size of the file space al‐
located to, and the size of the file space allocated to each subdirec‐
tory of, the file hierarchy rooted in each of the specified files. The
size of the file space allocated to a file of type directory is defined
as the sum total of space allocated to all files in the file hierarchy
rooted in the directory plus the space allocated to the directory it‐
self. This sum will include the space allocated to any extended attrib‐
utes encountered.
Files with multiple links will be counted and written for only one en‐
try. The directory entry that is selected in the report is unspecified.
By default, file sizes are written in 512-byte units, rounded up to the
next 512-byte unit.
/usr/xpg4/bin/du
When du cannot obtain file attributes or read directories (see
stat(2)), it will report an error condition and the final exit status
will be affected.
OPTIONS
The following options are supported for /usr/bin/du and
/usr/xpg4/bin/du:
-a
In addition to the default output, report the size of each file not
of type directory in the file hierarchy rooted in the specified
file. Regardless of the presence of the -a option, non-directories
given as file operands will always be listed.
-d
Do not cross filesystem boundaries. For example, the command, du -d
/ reports usage only on the root partition.
-h
All sizes are scaled to a human readable format. The -h option is
equivalent to using the --scale=max,1024 option.
-H
If a symbolic link to a directory is specified on the command line,
process the symbolic link by using the directory which the symbolic
link references, rather than the link itself.
-k
Write the files sizes in units of 1024 bytes, rather than the de‐
fault 512-byte units.
-L
Process symbolic links by using the file or directory which the
symbolic link references, rather than the link itself.
-m
Write the files sizes in units of megabytes, rather than the de‐
fault 512-byte units.
-o
Do not add child directories' usage to a parent's total. Without
this option, the usage listed for a particular directory is the
space taken by the files in that directory, as well as the files in
all directories beneath it. This option does nothing if -s is used.
-r
Generate diagnostic messages about unreadable directories and files
whose status cannot be obtained. /usr/bin/du is silent if these
conditions arise and -r is not specified. /usr/xpg4/bin/du acts as
though -r is always specified.
-s
Instead of the default output, report only the total sum for each
of the specified files.
--scale[=item1,item2,...]
All sizes are scaled to a human readable format, for example, 14K,
234M, 2.7G, or 3.0T. Scaling is done by repetitively dividing by
1024, unless otherwise specified. --scale specified without argu‐
ments enables default scaled output, and is equivalent to
--scale=max,1024. See scale(7) for a complete description of
--scale features.
-x
When evaluating file sizes, evaluate only those files that have the
same device as the file specified by the file operand.
Specifying more than one of the options in the mutually exclusive pair,
-H and -L, is not considered an error. The last option specified deter‐
mines the output format.
Specifying more than one of the options in the mutually exclusive set
of options -h, -k, and -m is not considered an error. The last option
specified determines the output format.
OPERANDS
The following operand is supported:
file The path name of a file whose size is to be written. If no file
is specified, the current directory is used.
OUTPUT
The output from du consists of the amount of the space allocated to a
file and the name of the file.
ENVIRONMENT VARIABLES
See environ(7) for descriptions of the following environment variables
that affect the execution of du: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES,
and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
/usr/bin/du
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/core-os _ CSIEnabled _ Interface
StabilityCommitted
/usr/xpg4/bin/du
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/xopen/xcu4 _ CSIEnabled _ Interface
StabilityStandard
SEE ALSO
ls(1), stat(2), attributes(7), environ(7), fsattr(7), scale(7), stan‐
dards(7)
NOTES
A file with two or more links is counted only once. If, however, there
are links between files in different directories where the directories
are on separate branches of the file system hierarchy, du will count
the excess files more than once.
Files containing holes will result in an incorrect block count.
HISTORY
Support for the --scale option was added to both du commands in Oracle
Solaris 11.4.30.
Support for the -m option was added to both du commands in Oracle So‐
laris 11.0.0.
Support for the -x option was added to the /usr/bin/du command in Ora‐
cle Solaris 11.0.0.
Support for the -d and -o options was added to the /usr/xpg4/bin/du
command in Oracle Solaris 11.0.0.
Support for the -H option was added to both du commands in Solaris 10
3/05.
Support for the -L option was added to the /usr/xpg4/bin/du command in
Solaris 10 3/05.
Support for the -h option was added to both du commands in Solaris 9.
Support for the -L option was added to the /usr/bin/du command in So‐
laris 2.6.
Support for large files was added to both du commands in Solaris 2.6.
The /usr/xpg4/bin/du command was introduced in Solaris 2.5, with sup‐
port for the -a, -k, -r, -s, and -x options.
Support for the -d and -o options was added to the /usr/bin/du command
in Solaris 2.3.
Support for the -k and -r options was added to the /usr/bin/du command
in Solaris 2.0.
The /usr/bin/du command, with support for the -a and -s options, has
been present in all Sun and Oracle releases of Solaris.
Oracle Solaris 11.4 29 Nov 2022 du(1)