Linux df命令详解

df命令的功能是用来检查linux服务器的文件系统的磁盘空间占用情况。

df常见命令参数

-a, --all             include dummy file systems
  -B, --block-size=SIZE  use SIZE-byte blocks
      --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)
  -P, --portability     use the POSIX output format
      --sync            invoke sync before getting usage info
  -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)

 

常用的命令展示:

显示所有磁盘空间占用情况

df -ha  【-a  显示所有】

注意: tmpfs 是一个不存在于实体硬盘上、而是驻在记忆里的特殊文件系统。其中一个副作用就是当你失去电源(或重就开机)时,tmpfs 上的一切内容都会消失。tmpfs 驻守在内存里,它的速度极快。它的寻觅时间与驻守在硬盘上的一般文件系统根本不能相比。

    mount  -t tmpfs tempfilesystem /mnt/tmpfs      【手动挂载tmpfs文件系统】

以inode模式显示磁盘使用情况

[root@localhost omc]# df -i

image

显示指定类型磁盘

[root@localhost omc]# df -ht ext4

image

列出文件系统的类型【常用】

[root@localhost omc]# df -h

image

转载于:https://www.cnblogs.com/ftl1012/p/df.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值