1, see block device information command: lsblk
1) Simple usage:
lsblk command to list the information available block devices , such as we are talking about logical disk, by default will list all block devices tree.
[root@vms002 /]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 100G 0 disk ├─sda1 8:1 0 40G 0 part / └─sda2 8:2 0 4G 0 part [SWAP] sr0 11: 0 1 0 3.6G rom / mnt
2) lsblk options:
lsblk --help
[root@vms002 /]# lsblk --help usage: lsblk [options] [<device> ...] Options: -a, --all print all equipment -b, --bytes in bytes rather than readable format to print SIZE -d, --nodeps not print the slave device (slave) device or placeholder (Holder) -D, discard ability --discard Print -e, --exclude <list> The master device negative number (default: RAM disk) -I, --include <list> show only the specified device major number -f, --fs output file system information -h, --help usage information (this information) -i, --ascii only use ascii characters -m, --perms output permission information -l, --list use the output format list -n, --noheadings no header -o, --output <list> column output -p, --paths print the complete device path -P, --pairs using key = "value" Output Format -r, --raw output format using the native -s, --inverse antidependence -t, --topology output topology information -S, --scsi output information about SCSI devices -h, --help display this help and exit -V, --version output version information and exit
2, view the file system disk space usage command: df
1) common options:
Options |
meaning |
-a |
Display all file system information, including system holding / proc , / the sysfs like file system; |
-m |
In MB units of display capacity; |
-k |
In KB Displays capacity Default in KB units; |
-h |
People used to use the KB , MB or GB and other units to display their own capacity; |
-T |
Displays the name of the file system partition; |
-i |
Do not show the hard disk capacity, but containing inode number to display ( inode information) |
2) Example:
① -a option:
[root@vms002 /]# df -a File System Used Available 1K- block with the mount point% rootfs 41922560 3300768 38621792 8% / percent 0 0 0 - / proc sysfs 0 0 0 - /sys devtmpfs 2007776 0 2007776 0% /dev securityfs 0 0 0 - /sys/kernel/security tmpfs 2016816 148 2016668 1% /dev/shm devpts 0 0 0 - /dev/pts tmpfs 2016816 9016 2007800 1% /run tmpfs 2016816 0 2016816 0% /sys/fs/cgroup cgroup 0 0 0 - /sys/fs/cgroup/systemd pstore 0 0 0 - /sys/fs/pstore cgroup 0 0 0 - /sys/fs/cgroup/cpuset cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct cgroup 0 0 0 - /sys/fs/cgroup/memory cgroup 0 0 0 - /sys/fs/cgroup/devices cgroup 0 0 0 - /sys/fs/cgroup/freezer cgroup 0 0 0 - /sys/fs/cgroup/net_cls cgroup 0 0 0 - /sys/fs/cgroup/blkio cgroup 0 0 0 - /sys/fs/cgroup/perf_event cgroup 0 0 0 - /sys/fs/cgroup/hugetlb configfs 0 0 0 - /sys/kernel/config /dev/sda1 41922560 3300768 38621792 8% / selinuxfs 0 0 0 - /sys/fs/selinux systemd-1 0 0 0 - /proc/sys/fs/binfmt_misc mqueue 0 0 0 - /dev/mqueue hugetlbfs 0 0 0 - /dev/hugepages debugfs 0 0 0 - /sys/kernel/debug gvfsd-fuse 0 0 0 - /run/user/1000/gvfs fusectl 0 0 0 - /sys/fs/fuse/connections / Dev / sr0 3,798,292 3,798,292 0,100% / mnt
② -hT options:
[root@vms002 /]# df -hT File system type available capacity has been used with a mount point% /dev/sda1 xfs 40G 3.2G 37G 8% / devtmpfs devtmpfs 2.0G 0 2.0G 0% /dev tmpfs tmpfs 2.0G 148K 2.0G 1% /dev/shm tmpfs tmpfs 2.0G 8.9M 2.0G 1% /run tmpfs tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup / Dev / sr0 iso9660 3.7G 3.7G 0 100% / mnt
③ -ihT options:
[Root @ vms002 /] # df -ihT Used Inode file system type (I) can be used (I) has a mount point (I)% /dev/sda1 xfs 40M 109K 40M 1% / devtmpfs devtmpfs 491K 326 490K 1% /dev tmpfs tmpfs 493K 8 493K 1% /dev/shm tmpfs tmpfs 493K 454 492K 1% /run tmpfs tmpfs 493K 13 493K 1% /sys/fs/cgroup /dev/sr0 iso9660 0 0 0 - /mnt
Reproduced in: https: //blog.51cto.com/13716812/2403208