NotePublic/Software/Applications/Du_Df/Du_和_Df_命令说明.md

40 lines
1.4 KiB
Markdown
Raw Normal View History

# Du 和 Df 命令说明
2020-08-28 21:31:49 +08:00
## Du
参数解释
| 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 |
2020-08-28 21:31:49 +08:00
常见用法
```bash
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 |
2020-08-28 21:31:49 +08:00
常见用法
```bash
df -hT
df -h -t=ext4
2020-08-28 21:31:49 +08:00
```