完善 Du 和 Df 命令.

Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
rick.chan 2020-12-25 13:52:08 +08:00
parent 8b0577a772
commit 80468d5779
1 changed files with 20 additions and 10 deletions

View File

@ -4,15 +4,14 @@
参数解释
-a列出所有的文件与目录容量因为默认仅统计目录的容量而已
-h: 以人们较易读的容量格式呈现(G/M/K)显示,自动选择显示的单位大小
-s: 列出总量而已,而不列出每个个别的目录占用容量
-k以KB为单位进行显示
-m: 以MB为单位进行显示常用命令参考
| Options | Description |
|----------------------|---------------------------------------------------------|
| -a, --all | write counts for all files, not just directories |
| -h, --human-readable | print sizes in human readable format (e.g., 1K 234M 2G) |
| -k | like --block-size=1K |
| -m | like --block-size=1M |
| -S, --separate-dirs | for directories do not include size of subdirectories |
| -s, --summarize | display only a total for each argument |
常见用法
@ -22,8 +21,19 @@ du -sh <folder>
## Df
参数解释
| Options | Description |
|-------------------------|------------------------------------------------------|
| -a, --all | include pseudo, duplicate, inaccessible file systems |
| -h, --human-readable | print sizes in powers of 1024 (e.g., 1023M) |
| -t, --type=TYPE | limit listing to file systems of type TYPE |
| -T, --print-type | print file system type |
| -x, --exclude-type=TYPE | limit listing to file systems not of type TYPE |
常见用法
```bash
df -h
df -hT
df -h -t=ext4
```