From 6f55e3640ecb2289ec7f226ed8cffa96ade4a93a Mon Sep 17 00:00:00 2001 From: witt <52407727+witt-bit@users.noreply.github.com> Date: Wed, 15 Jan 2025 18:20:53 +0800 Subject: [PATCH] du: add Chinese translation (#15466) * du: add zh translation * Update pages.zh/common/du.md Co-authored-by: P2Tree * Update pages.zh/common/du.md Co-authored-by: P2Tree * du: sync pages/common/du.md * du: fix command error --------- Co-authored-by: P2Tree Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> --- pages.zh/common/du.md | 32 ++++++++++++++++++++++++++++++++ pages/common/du.md | 4 ++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 pages.zh/common/du.md diff --git a/pages.zh/common/du.md b/pages.zh/common/du.md new file mode 100644 index 0000000000..e5c82f8bd5 --- /dev/null +++ b/pages.zh/common/du.md @@ -0,0 +1,32 @@ +# 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}} .[^.]* *` diff --git a/pages/common/du.md b/pages/common/du.md index 1061c806ff..df5adcfa0b 100644 --- a/pages/common/du.md +++ b/pages/common/du.md @@ -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):