Linux command
df 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
df
Example
df -h
Example
df [path/to/file_or_directory]
Example
df -i
Example
df -x squashfs -x tmpfs
Example
df -T
说明
df (disk free) displays the amount of disk space available on filesystems. By default, it shows all mounted filesystems with their total size, used space, available space, and usage percentage.
参数
- -h, --human-readable
- Print sizes in human-readable format (K, M, G)
- -H, --si
- Print sizes using powers of 1000 (not 1024)
- -i, --inodes
- Show inode information instead of block usage
- -T, --print-type
- Print filesystem type
- -t, --type type
- Limit listing to filesystems of specified type
- -x, --exclude-type type
- Exclude filesystems of specified type
- -a, --all
- Include dummy filesystems
- -l, --local
- Limit listing to local filesystems
- --total
- Print a total line
- -P, --portability
- Use POSIX output format
FAQ
What is the df command used for?
df (disk free) displays the amount of disk space available on filesystems. By default, it shows all mounted filesystems with their total size, used space, available space, and usage percentage.
How do I run a basic df example?
Run `df` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -h, --human-readable do in df?
Print sizes in human-readable format (K, M, G)