1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 05:42:09 +02:00

du: add Chinese translation (#15466)

* du: add zh translation

* Update pages.zh/common/du.md

Co-authored-by: P2Tree <dicksonliuming@gmail.com>

* Update pages.zh/common/du.md

Co-authored-by: P2Tree <dicksonliuming@gmail.com>

* du: sync pages/common/du.md

* du: fix command error

---------

Co-authored-by: P2Tree <dicksonliuming@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:
witt 2025-01-15 18:20:53 +08:00 committed by GitHub
parent 585b133a38
commit 6f55e3640e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 2 deletions

32
pages.zh/common/du.md Normal file
View file

@ -0,0 +1,32 @@
# du
> 磁盘使用率:估计和汇总文件和目录空间使用率。
> 更多信息:<https://www.gnu.org/software/coreutils/du>.
- 以给定单位(B/KiB/MiB)列出目录和所有子目录的大小:
`du -{{b|k|m}} {{路径/到/目录}}`
- 以可读形式列出目录和任何子目录的大小(即自动转换为的合适的单位):
`du -h {{路径/到/目录}}`
- 以可读单位显示目录大小:
`du -sh {{路径/到/目录}}`
- 列出目录以及其中所有文件和目录的可读大小:
`du -ah {{路径/到/目录}}`
- 列出目录和任何子目录的可读大小,最多可达 N 级:
`du -h --max-depth=N {{路径/到/目录}}`
- 列出当前目录中所有 `.jpg` 文件的可读大小,并在最后显示累计总数:
`du -ch {{./*.jpg}}`
- 列出超过特定大小的所有文件和目录(包括隐藏的文件和目录)(对于查询实际占用空间很有用):
`du --all --human-readable --threshold {{1G|1024M|1048576K}} .[^.]* *`

View file

@ -23,9 +23,9 @@
`du -h --max-depth=N {{path/to/directory}}`
- List the human-readable size of all `.jpg` files in subdirectories of the current directory, and show a cumulative total at the end:
- List the human-readable size of all `.jpg` files in current directory, and show a cumulative total at the end:
`du -ch {{*/*.jpg}}`
`du -ch {{./*.jpg}}`
- List all files and directories (including hidden ones) above a certain [t]hreshold size (useful for investigating what is actually taking up the space):