Provided by: manpages-zh_1.6.3.6-1_all bug

名称

       du - 估计磁盘文件使用量

概述

       du [选项]... [文件]...
       du [OPTION]... --files0-from=F

描述

       计算每个文件的磁盘用量,目录则取总用量。

       必选参数对长短选项同时适用。

       -0, --null
              使每行输出以 NUL 字符结束,不添加换行符

       -a, --all
              输出所有文件的磁盘用量,不仅仅是目录

       --apparent-size
              显示表面用量,而并非是磁盘用量;虽然表面用量通常会小一些,但有时它会因为稀疏文件间
              的“洞”、内部碎片、非直接引用的块等原因显得更大一些。

       -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
              显示版本信息并退出

       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).

       The SIZE argument is an integer and optional unit (example: 10K is  10*1024).   Units  are
       K,M,G,T,P,E,Z,Y  (powers  of  1024) or KB,MB,... (powers of 1000).  Binary prefixes can be
       used, too: KiB=K, MiB=M, and so on.

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 © 2020 Free Software Foundation, Inc.  License GPLv3+:  GNU  GPL  version  3  or
       later <https://gnu.org/licenses/gpl.html>.
       This  is free software: you are free to change and redistribute it.  There is NO WARRANTY,
       to the extent permitted by law.

参见

       完整文档请见: <https://www.gnu.org/software/coreutils/du>
       或者在本地使用: info '(coreutils) du invocation'

       本页面中文版由中文 man 手册页计划提供。
       中文 man 手册页计划:https://github.com/man-pages-zh/manpages-zh