English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Linux duコマンド(英語全称:disk usage)は、ディレクトリやファイルのサイズを表示するために使用されます。
duは指定されたディレクトリやファイルが占めるディスク容量を表示します。
du [-abcDhHklmsSx][-L <符号リンク>][-X <ファイル>][--ブロック-size][--exclude=<ディレクトリやファイル>][--max-depth=<ディレクトリレベル>][--ヘルプ][--バージョン][ディレクトリやファイル]
パラメータ説明:
ディレクトリまたはファイルが占める空間を表示:
# du 608 ./test6 308 ./test4 4 ./scf/lib 4 ./scf/service/deploy/product 4 ./scf/service/deploy/info 12 ./scf/service/deploy 16 ./scf/service 4 ./scf/doc 4 ./scf/bin 32 ./scf 8 ./test3 1288 .
現在のディレクトリの下のサブディレクトリのサイズと現在のディレクトリの合計サイズを表示する,最も下の1288現在のディレクトリの合計サイズ
指定されたファイルが占める空間を表示
# du log2012.log 300 log2012.log
test ディレクトリが占める空間の状況を読みやすく表示する:
# du -h test 608K test/test6 308K test/test4 4.0K test/scf/lib 4.0K test/scf/service/deploy/product 4.0K test/scf/service/deploy/info 12K test/scf/service/deploy 16K test/scf/service 4.0K test/scf/doc 4.0K test/scf/bin 32K test/scf 8.0K test/test3 1.3M test