df -T 只可以查看已經(jīng)掛載的分區(qū)和文件系統(tǒng)類型叉抡。
[root@bogon ~]# df -T |sort
/dev/sda1 xfs 201380 110156 91224 55% /boot
/dev/sda2 xfs 5232640 1322948 3909692 26% /
devtmpfs devtmpfs 988188 0 988188 0% /dev
Filesystem Type 1K-blocks Used Available Use% Mounted on
tmpfs tmpfs 199804 0 199804 0% /run/user/0
tmpfs tmpfs 999004 0 999004 0% /dev/shm
tmpfs tmpfs 999004 0 999004 0% /sys/fs/cgroup
tmpfs tmpfs 999004 8728 990276 1% /run
fdisk -l 可以顯示出所有掛載和未掛載的分區(qū)猬膨,但不顯示文件系統(tǒng)類型角撞。
[root@bogon ~]# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0004a60d
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 411647 204800 83 Linux
/dev/sda2 411648 10897407 5242880 83 Linux
/dev/sda3 10897408 12994559 1048576 82 Linux swap / Solaris
/dev/sda4 12994560 20971519 3988480 5 Extended
/dev/sda5 12996608 20971519 3987456 8e Linux LVM
parted -l 可以查看未掛載的文件系統(tǒng)類型,以及哪些分區(qū)尚未格式化勃痴。
[root@bogon ~]# parted -l
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 211MB 210MB primary xfs boot
2 211MB 5579MB 5369MB primary xfs
3 5579MB 6653MB 1074MB primary linux-swap(v1)
4 6653MB 10.7GB 4084MB extended
5 6654MB 10.7GB 4083MB logical lvm
Model: VBOX HARDDISK (scsi)
Disk /dev/sdb: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 2000MB 1999MB primary
lsblk -f 也可以查看未掛載的文件系統(tǒng)類型谒所。
[root@bogon ~]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 xfs cc6f5ff6-75a7-4e2c-97cc-53bf7c35fa0e /boot
├─sda2 xfs 6fcf2464-d656-4067-87c3-69ce22c8eb3e /
├─sda3 swap 78ebd072-544d-4c52-8e65-ca4fc8b8f849 [SWAP]
├─sda4
└─sda5
sdb
└─sdb1 LVM2_member R6FfrF-HccG-u2Bt-BMJI-4Ajd-aNDV-7qfqTE
sr0
file -s /dev/sda3 查看指定分區(qū)的文件系統(tǒng)信息
[root@bogon ~]# file -s /dev/sda2
/dev/sda2: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)