Man page - du(1)
Packages contas this manual
- timeout(1)
- ls(1)
- uname(1)
- runcon(1)
- nohup(1)
- dir(1)
- hostid(1)
- paste(1)
- sum(1)
- who(1)
- join(1)
- factor(1)
- touch(1)
- chown(1)
- md5sum(1)
- nl(1)
- mkdir(1)
- tac(1)
- false(1)
- stat(1)
- chmod(1)
- sha224sum(1)
- mktemp(1)
- readlink(1)
- seq(1)
- echo(1)
- comm(1)
- tsort(1)
- mkfifo(1)
- unexpand(1)
- cp(1)
- sha256sum(1)
- shred(1)
- tee(1)
- uniq(1)
- expr(1)
- sha384sum(1)
- basenc(1)
- ptx(1)
- fmt(1)
- chcon(1)
- wc(1)
- realpath(1)
- mv(1)
- sha512sum(1)
- yes(1)
- vdir(1)
- printf(1)
- b2sum(1)
- mknod(1)
- tail(1)
- chroot(8)
- tr(1)
- [(1)
- od(1)
- cut(1)
- date(1)
- cat(1)
- du(1)
- pr(1)
- fold(1)
- dirname(1)
- sha1sum(1)
- printenv(1)
- numfmt(1)
- nproc(1)
- chgrp(1)
- sync(1)
- ln(1)
- pwd(1)
- install(1)
- base64(1)
- test(1)
- true(1)
- cksum(1)
- tty(1)
- rmdir(1)
- expand(1)
- link(1)
- df(1)
- stty(1)
- dd(1)
- split(1)
- truncate(1)
- dircolors(1)
- head(1)
- shuf(1)
- id(1)
- basename(1)
- users(1)
- base32(1)
- nice(1)
- sort(1)
- sleep(1)
- unlink(1)
- logname(1)
- whoami(1)
- pathchk(1)
- rm(1)
- csplit(1)
- groups(1)
- stdbuf(1)
- arch(1)
- env(1)
- pinky(1)
apt-get install coreutils
Available languages:
en fr es pl vi nb ko nl da cs tr hu sv ja uk id fi ru ro zh_TW sr zh_CN deManual
| DU(1) | 使用者命令 | DU(1) |
名稱
du - 估計磁碟檔案使用量
概述
du [選項]...
[檔案]...
du [選項]... --files0-from=F
描述
計算每個檔案的裝置用量,目錄則取總用量。
必選引數對長短選項同時適用。
- -0, --null
- 使每行輸出以 NUL 字元結束,不新增換行符
- -a, --all
- 輸出所有檔案的磁碟用量,不僅僅是目錄
- --apparent-size
- print apparent sizes rather than device 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=大小
- 以指定大小為單位對塊大小進行輸出;例如,'-BM' 以 1,048,576 位元組為單位輸出大小;詳情請參見下方的“SIZE 格式”部分
- -b, --bytes
- 等效於 '--apparent-size --block-size=1'
- -c, --total
- 顯示總計資訊
- -D, --dereference-args
- 只在符號連結顯式在命令列列出時對其進行解引用
- -d, --max-depth=N
- 僅當目錄(或在 --all 選項啟用時包括檔案)層級不高於命令列引數指定的 N 層時輸出對應目錄或檔案的對應大小;--max-depth=0 等效於 --summarize
- --files0-from=F
- 統計檔案 F 中的以 NUL 空字元分隔的檔名所對應的各個檔案的裝置使用量;如果 F 是 "-",則從標準輸入讀取檔名
- -H
- 和 --dereference-args(-D)等效
- -h, --human-readable
- 以人類可讀的格式輸出大小(例如,1K 234M 2G)
- --inodes
- 列出 inode 使用資訊而非塊使用資訊
- -k
- 等效於 --block-size=1K
- -L, --dereference
- 解引用所有符號連結
- -l, --count-links
- 如果是硬連線,則重複計算其尺寸
- -m
- 等效於 --block-size=1M
- -P, --no-dereference
- 不跟隨任何符號連結(預設行為)
- -S, --separate-dirs
- 不包括子目錄的佔用量
- --si
- 類似 -h,但使用 1000 的倍數,而非 1024
- -s, --summarize
- 只分別計算命令列中每個引數所佔的總用量
- -t, --threshold=大小
- 如果指定大小為正值,排除比該值更小的項,或者在值為負時排除更大的項
- --time
- 顯示目錄中或其子目錄下所有檔案的最後修改時間
- --time=關鍵字
- 顯示指定關鍵字對應的時間而非最後修改時間:atime, access, use, ctime 或 status
- --time-style=格式
- 使用指定格式顯示時間,格式可以為:full-iso, long-iso, iso 或 +FORMAT;FORMAT 字串以與 'date' 工具類似的方式解讀
- -X, --exclude-from=檔案
- 排除所有與指定檔案所提供模式匹配的檔案
- --exclude=模式
- 排除所有與所給模式匹配的檔案
- -x, --one-file-system
- 跳過位於不同檔案系統上的目錄
- --help
- 顯示此幫助資訊並退出
- --version
- 顯示版本資訊並退出
所顯示的數值的單位是 --block-size 選項的引數、DU_BLOCK_SIZE、BLOCK_SIZE 和 BLOCKSIZE 環境變數的值中,第一個可用的大小。否則,預設單位是 1024 位元組(如果 POSIXLY_CORRECT 被設定,則為 512 位元組)。
大小 引數是一個整數,後面可以跟一個單位(例如:10K 指 10*1024)。可用的單位有 K、M、G、T、P、E、Z、Y(1024 的冪)以及 KB、MB、...(1000 的冪)。也可以使用二進位制字首:KiB=K、MiB=M,以此類推。
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).
作者
由 Torbjorn Granlund、David MacKenzie、Paul Eggert 和 Jim Meyering 編寫。
報告錯誤
GNU coreutils 的線上幫助:
<https://www.gnu.org/software/coreutils/>
請向 <https://translationproject.org/team/zh_CN.html>
報告翻譯錯誤。
版權
Copyright © 2022 Free Software Foundation, Inc. License
GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
本軟體是自由軟體:您可以自由修改和重新發布它。在法律允許的範圍內,不提供任何保證。
參見
完整文件請見:
<https://www.gnu.org/software/coreutils/du>
或者在本地使用: info
'(coreutils) du invocation'
跋
本頁面中文版由中文
man 手冊頁計劃提供。
中文 man
手冊頁計劃:https://github.com/man-pages-zh/manpages-zh
| 2022年9月 | GNU coreutils 9.1 |