[Linux] 磁盘使用情况查看

linux中df命令的功能是用来检查linux服务器的文件系统的磁盘空间占用情况。可以利用该命令来获取硬盘被占用了多少空间,目前还剩下多少空间等信息。

Usage: df [OPTION]... [FILE]...
Show information about the file system on which each FILE resides,
  or all file systems by default.

Mandatory强制的 arguments to long options are mandatory for short options too.
-a, --all include dummy file systems 全部文件系统列表
-B, --block-size=SIZE scale sizes by SIZE before printing them; 指定区块大小

   e.g., 
  '-BM' prints sizes in units of 1,048,576 bytes;
  see SIZE format below
  --direct show statistics for a file instead of mount point
  --total produce a grand total
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
-i, --inodes list inode information instead of block usage
-k like --block-size=1K
-l, --local limit listing to local file systems 只显示本地文件系统
  --no-sync do not invoke sync before getting usage info (default) 忽略 sync 命令
  --output[=FIELD_LIST] use the output format defined by FIELD_LIST,
    or print all fields if FIELD_LIST is omitted.
-P, --portability use the POSIX output format
  --sync invoke调用 sync before getting usage info 在取得磁盘信息前,先执行sync命令
-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 <文件系统类型> 不显示选定文件系统的磁盘信息
-v (ignored)
  --help display this help and exit
  --version output version information and exit

Display values are in units of the first available SIZE from --block-size,
and the DF_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).

SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units
are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000).

FIELD_LIST is a comma-separated list of columns to be included. Valid
field names are: 'source', 'fstype', 'itotal', 'iused', 'iavail', 'ipcent',
'size', 'used', 'avail', 'pcent', 'file' and 'target' (see info page).

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'df invocation'

转载于:https://www.cnblogs.com/xiaofeiIDO/p/6422901.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值