美文网首页每天一个Linux命令
每天一个Linux 命令 - 查看系统硬盘

每天一个Linux 命令 - 查看系统硬盘

作者: BlackChen | 来源:发表于2017-03-03 23:15 被阅读44次

df

cc@MyLinux:~$ sudo df -hl
Filesystem      Size  Used Avail Use% Mounted on
udev            471M     0  471M   0% /dev
tmpfs            98M  5.9M   92M   7% /run
/dev/sda1        19G  5.4G   13G  31% /
tmpfs           488M     0  488M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           488M     0  488M   0% /sys/fs/cgroup
tmpfs            98M     0   98M   0% /run/user/1000
tmpfs            98M     0   98M   0% /run/user/1001

参数解读:

  • -h, --human-readable print sizes in powers of 1024 (e.g., 1023M)
  • -l ,--local limit listing to local file systems
cc@MyLinux:~$ df -ih
Filesystem     Inodes IUsed IFree IUse% Mounted on
udev             118K   474  118K    1% /dev
tmpfs            122K   658  122K    1% /run
/dev/sda1        1.2M  207K 1010K   18% /
tmpfs            122K     1  122K    1% /dev/shm
tmpfs            122K     3  122K    1% /run/lock
tmpfs            122K    16  122K    1% /sys/fs/cgroup
tmpfs            122K     4  122K    1% /run/user/1000
tmpfs            122K     4  122K    1% /run/user/1001

参数解读:

  • -h, --human-readable print sizes in powers of 1024 (e.g., 1023M)
  • -i, --inodes list inode information instead of block usage
cc@MyLinux:~$ df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  471M     0  471M   0% /dev
tmpfs          tmpfs      98M  5.9M   92M   7% /run
/dev/sda1      ext4       19G  5.4G   13G  31% /
tmpfs          tmpfs     488M     0  488M   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     488M     0  488M   0% /sys/fs/cgroup
tmpfs          tmpfs      98M     0   98M   0% /run/user/1000
tmpfs          tmpfs      98M     0   98M   0% /run/user/1001

参数解读:

  • -h, --human-readable print sizes in powers of 1024 (e.g., 1023M)
  • -T, --print-type print file system type

fdisk

sudo fdisk -l

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 39845887 39843840   19G 83 Linux
/dev/sda2       39847934 41940991  2093058 1022M  5 Extended
/dev/sda5       39847936 41940991  2093056 1022M 82 Linux swap / Solaris

相关文章

网友评论

    本文标题:每天一个Linux 命令 - 查看系统硬盘

    本文链接:https://www.haomeiwen.com/subject/suqlgttx.html