Usage: du [OPTION]... [FILE]...
or: du [OPTION]... --files0-from=F
ファイル毎のディスク使用量を集計する。ディレクトリは再帰的に処理する。
長いオプションに必須の引数は短いオプションにも必須です.
-a, --all write counts for all files, not just directories
--apparent-size print apparent sizes, rather than disk usage; although
the apparent size is usually smaller, it may be
larger due to holes in (`sparse') files, internal
fragmentation, indirect blocks, and the like
-B, --block-size=SIZE use SIZE-byte blocks
-b, --bytes equivalent to `--apparent-size --block-size=1'
-c, --total produce a grand total
-D, --dereference-args dereference only symlinks that are listed on the
command line
--files0-from=F summarize disk usage of the NUL-terminated file
names specified in file F;
If F is - then read names from standard input
-H equivalent to --dereference-args (-D)
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
--si like -h, but use powers of 1000 not 1024
-k like --block-size=1K
-l, --count-links count sizes many times if hard linked
-m like --block-size=1M
-L, --dereference dereference all symbolic links
-P, --no-dereference don't follow any symbolic links (this is the default)
-0, --null end each output line with 0 byte rather than newline
-S, --separate-dirs do not include size of subdirectories
-s, --summarize display only a total for each argument
-x, --one-file-system skip directories on different file systems
-X, --exclude-from=FILE exclude files that match any pattern in FILE
--exclude=PATTERN exclude files that match PATTERN
--max-depth=N print the total for a directory (or file, with --all)
only if it is N or fewer levels below the command
line argument; --max-depth=0 is the same as
--summarize
--time show time of the last modification of any file in the
directory, or any of its subdirectories
--time=WORD show time as WORD instead of modification time:
atime, access, use, ctime or status
--time-style=STYLE show times using style STYLE:
full-iso, long-iso, iso, +FORMAT
FORMAT is interpreted like `date'
--help この使い方を表示して終了
--version バージョン情報を表示して終了
Display values are in units of the first available SIZE from --block-size,
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).
SIZE may be (or may be an integer optionally followed by) one of following:
KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.
Report du bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: du [OPTION]... [FILE]...
or: du [OPTION]... --files0-from=F
Summarize disk usage of each FILE, recursively for directories.
Mandatory arguments to long options are mandatory for short options too.
-a, --all write counts for all files, not just directories
--apparent-size print apparent sizes, rather than disk usage; although
the apparent size is usually smaller, it may be
larger due to holes in (`sparse') files, internal
fragmentation, indirect blocks, and the like
-B, --block-size=SIZE use SIZE-byte blocks
-b, --bytes equivalent to `--apparent-size --block-size=1'
-c, --total produce a grand total
-D, --dereference-args dereference only symlinks that are listed on the
command line
--files0-from=F summarize disk usage of the NUL-terminated file
names specified in file F;
If F is - then read names from standard input
-H equivalent to --dereference-args (-D)
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
--si like -h, but use powers of 1000 not 1024
-k like --block-size=1K
-l, --count-links count sizes many times if hard linked
-m like --block-size=1M
-L, --dereference dereference all symbolic links
-P, --no-dereference don't follow any symbolic links (this is the default)
-0, --null end each output line with 0 byte rather than newline
-S, --separate-dirs do not include size of subdirectories
-s, --summarize display only a total for each argument
-x, --one-file-system skip directories on different file systems
-X, --exclude-from=FILE exclude files that match any pattern in FILE
--exclude=PATTERN exclude files that match PATTERN
--max-depth=N print the total for a directory (or file, with --all)
only if it is N or fewer levels below the command
line argument; --max-depth=0 is the same as
--summarize
--time show time of the last modification of any file in the
directory, or any of its subdirectories
--time=WORD show time as WORD instead of modification time:
atime, access, use, ctime or status
--time-style=STYLE show times using style STYLE:
full-iso, long-iso, iso, +FORMAT
FORMAT is interpreted like `date'
--help display this help and exit
--version output version information and exit
Display values are in units of the first available SIZE from --block-size,
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).
SIZE may be (or may be an integer optionally followed by) one of following:
KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.
Report du bugs to bug-coreutils@gnu.org
GNU coreutils home page:
DU(1) DU(1) 名前 du - ファイルのディスク使用量を見積もる 書式 du [options] [file...] POSIX オプション: [-askx] GNU オ プ シ ョ ン ( 簡 略 形 式): [-abchklmsxDHLS] [-X FILE] [--block-size=SIZE] [--max-depth=DEPTH] [--exclude=PATTERN] [--help] [--version] [--] 説明 du はディスクの使用量を表示する。対象は指定したファイルと、それをルート (根) とする階層中にある全ディレクトリである。ここで「ディスク使用量」と は、指定したファイル以下の全ファイル階層による使用量を意味する。 引き数がない場合、 du は現在のディレクトリのディスク使用量を表示する。 POSIX 詳細 出力はデフォルトでは 512 バイト単位であるが、 -k オプションが指定された 場合は 1024 バイト単位になる。 POSIX オプション -a ディレクトリだけでなく、全てのファイルについて容量を表示する。 -k デフォルトの 512 バイト単位の代わりに 1024 バイト単位を使用す る 。 -s 実際に引き数で指定された対象による使用量のみを表示し、そのサブデ ィレクトリによる使用量は表示しない。 -x 引き数で指定されたファイルと同じディバイス上のみで使用量を集計す る。 GNU オプション -a, --all ディレクトリだけでなく、全てのファイルについて容量を表示する。 -b, --bytes デフォルトのブロックサイズを無視し、バイト単位でサイズを表示する 。 -c, --total 全ての引き数について使用量表示の処理をした後、全ての引き数の使用 量の総計を表示する。このオプションは、ファイル・ディレクトリのセ ットを与え、それらのディスク総使用量を調べるために使用される。 -h, --human-readable それぞれのサイズに、例えばメガバイトなら M のようなサイズ文字 を 付 加 す る 。 10 の 累乗ではなく 2 の累乗を用いるので、 M は 1,048,576 バイトを表す。 -k, --kilobytes サイズをキロバイト単位で表示する。 -l, --count-links あるファイルが (ハードリンクとして) 既に集計されている場合を含め 、全てのファイルの使用量を集計する。 -m, --megabytes メガバイト (1,048,576 バイト) 単位でサイズを表示する。 -s, --summarize それぞれの引き数について、総計のみを表示する。 -x, --one-file-system 引き数で指定されたファイルのあるファイルシステムとは異なるファイ ルシステム上にあるディレクトリを集計に含めない。 -D, --dereference-args コマンドライン引き数で指定したシンボリックリンクをたどる。他のシ ンボリックリンクはたどらない。このオプションは、たいていシンボリ ックリンクになっている /usr/tmp のようなディレクトリのディスク使 用量を調べるのに便利である。 -H, --si そ れぞれのサイズに、例えばメガバイトなら M のようなサイズ文字を 付加する (SIとは国際単位系のことで、これらの文字を接頭辞と定義し て い る) 。 2 の 累 乗 ではなく 10 の累乗を用いるので、 M は 1,000,000 バイトを表す。 -L, --dereference シンボリックリンクをたどる (シンボリックリンク自体が使用する容量 の 代わりに、リンク先のファイルやディレクトリの使用量を表示する) 。 -S, --separate-dirs サブディレクトリの使用量を含めずに、個々のディレクトリの使用量を 分けて表示する。 -X FILE, --exclude-from=FILE --exclude と類似するが、除外するためのパターンを FILE から一行ず つ取り込む。 FILE が ‘-’ のときはパターンを標準入力から読み込 む 。 --block-size=SIZE 環境変数の値を無視し、ブロックサイズを SIZE に設定する。 --exclude=PATTERN 再帰的に集計する際、PATTERN にマッチする名前のサブディレクトリや ファイルを除外する。 ‘du --exclude=’*~’’ の場合には ‘~’ で終わる 名前のファイルは除外される。 --max-depth=DEPTH 階 層のルートから深さレベルが最大 DEPTH までにある各ディレクトリ の (-all が指定されている場合はファイルも含めた) ディスク使用 量 の 合 計 を 表 示 す る 。 ル ー ト は レ ベル 0 であるので、‘du --max-depth=0’ は ‘du -s’ と等しい。 GNU 標準オプション --help 標準出力に使用方法のメッセージを出力して正常終了する。 --version 標準出力にバージョン情報を出力して正常終了する。 -- オプションリストの終りを示す。 バグ BSD システムでは、HP-UX システムから NFS マウントしたファイルに対して、 du は正しい値の半分の値を表示してしまう。 HP-UX システムでは、BSD シス テムから NFS マウントしたファイルに対して、正しい値の 2 倍の値を表示 し てしまう。これは HP-UX の欠陥によるもので、HP-UX の du プログラムにも影 響を及ぼしている。 ブロックサイズ デフォルトの出力ファイルブロックサイズは 1024 バイト (POSIXLY_CORRECTが 設定されているときは 512 バイト) である。この値は以下の環境変数のどれか を設定することで変更できる 。 ま た 、 こ れ ら の 環 境 変 数 の 値 は --block-size=SIZE がオプションに与えられると無視される。 優先順位: DU_BLOCK_SIZE, BLOCK_SIZE, POSIXLY_CORRECT. こ れらの変数の値は、数字でも human-readable でも si でもよい。数字の後 には、何倍であるかを指定するサイズ文字と、通常のバイトを選択する B また は 10 進 の 「 商 業 用」バイトを選択する D を続けてもよい。たとえば 、‘BLOCK_SIZE=1KB’ は ‘BLOCK_SIZE=1024’ に等しく、 ‘BLOCK_SIZE=1KD’ は ‘BLOCK_SIZE=1000’ に等しい。 以 下の文字が認識される (また --human-readable と --si オプションで表示 されるときに用いられる) k キロ: --human-readable なら 2^10 = 1024、 --si なら 10^3 = 1000 M メガ: 2^20 = 1,048,576 または 10^6 = 1,000,000 G ギガ: 2^30 = 1,073,741,824 または 10^9 = 1,000,000,000 T テラ: 2^40 = 1,099,511,627,776 または 10^12 = 1,000,000,000,000 P ペ タ: 2^50 = 1,125,899,906,842,624 ま た は 10^15 = 1,000,000,000,000,000 E エ ク サ: 2^60 = 1,152,921,504,606,846,976 ま たは 10^18 = 1,000,000,000,000,000,000 Z ゼタ: 2^70 = 1,180,591,620,717,411,303,424 ま た は 10^21 = 1,000,000,000,000,000,000,000 Y ヨ タ: 2^80 = 1,208,925,819,614,629,174,706,176 または 10^24 = 1,000,000,000,000,000,000,000,000 環境変数 変数 DF_BLOCK_SIZE, BLOCK_SIZE, OSIXLY_CORRECT は出力ファイルブロックサ イズの選択を決定する。変数 LANG, LC_ALL, LC_CTYPE, LC_MESSAGES が通常の 意味を持つ。 準拠 POSIX 1003.2 注意 ディスク使用量は丸めの際に繰上げられ、空き容量は繰り下げられる。 このページは fileutils-4.1 パッケージの du コマンドについて説明したもの で ある; その他のバージョンでは少し違いがあるかもしれない。修正や追加は aeb@cwi.nl, aw@mail1.bet1.puv.fi, ragnar@ragnar-hojland.com 宛にメー ル で連絡してください。プログラムのバグについては bug-fileutils@gnu.org へ 報告してください。 GNU fileutils 4.1 18 June 2002 DU(1)
DU(1) User Commands DU(1)
NAME
du - estimate file space usage
SYNOPSIS
du [OPTION]... [FILE]...
du [OPTION]... --files0-from=F
DESCRIPTION
Summarize disk usage of each FILE, recursively for directories.
Mandatory arguments to long options are mandatory for short options
too.
-a, --all
write counts for all files, not just directories
--apparent-size
print apparent sizes, rather than disk usage; although the
apparent size is usually smaller, it may be larger due to holes
in (‘sparse’) files, internal fragmentation, indirect blocks,
and the like
-B, --block-size=SIZE
use SIZE-byte blocks
-b, --bytes
equivalent to ‘--apparent-size --block-size=1’
-c, --total
produce a grand total
-D, --dereference-args
dereference only symlinks that are listed on the command line
--files0-from=F
summarize disk usage of the NUL-terminated file names specified
in file F; If F is - then read names from standard input
-H equivalent to --dereference-args (-D)
-h, --human-readable
print sizes in human readable format (e.g., 1K 234M 2G)
--si like -h, but use powers of 1000 not 1024
-k like --block-size=1K
-l, --count-links
count sizes many times if hard linked
-m like --block-size=1M
-L, --dereference
dereference all symbolic links
-P, --no-dereference
don’t follow any symbolic links (this is the default)
-0, --null
end each output line with 0 byte rather than newline
-S, --separate-dirs
do not include size of subdirectories
-s, --summarize
display only a total for each argument
-x, --one-file-system
skip directories on different file systems
-X, --exclude-from=FILE
exclude files that match any pattern in FILE
--exclude=PATTERN
exclude files that match PATTERN
--max-depth=N
print the total for a directory (or file, with --all) only if it
is N or fewer levels below the command line argument;
--max-depth=0 is the same as --summarize
--time show time of the last modification of any file in the directory,
or any of its subdirectories
--time=WORD
show time as WORD instead of modification time: atime, access,
use, ctime or status
--time-style=STYLE
show times using style STYLE: full-iso, long-iso, iso, +FORMAT
FORMAT is interpreted like ‘date’
--help display this help and exit
--version
output version information and exit
Display values are in units of the first available SIZE from
--block-size, and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environ-
ment variables. Otherwise, units default to 1024 bytes (or 512 if
POSIXLY_CORRECT is set).
SIZE may be (or may be an integer optionally followed by) one of fol-
lowing: KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T,
P, E, Z, Y.
PATTERNS
PATTERN is a shell pattern (not a regular expression). The pattern ?
matches any one character, whereas * matches any string (composed of
zero, one or multiple characters). For example, *.o will match any
files whose names end in .o. Therefore, the command
du --exclude='*.o'
will skip all files and subdirectories ending in .o (including the file
.o itself).
AUTHOR
Written by Torbjorn Granlund, David MacKenzie, Paul Eggert, and Jim
Meyering.
REPORTING BUGS
Report du bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa