1、用df 命令查看查看目录所在分区,例如查看/usr目录所在分区:
[root@localhost /]# df -h /usr
Filesystem Size Used Avail Use% Mounted on
/dev/vda2 40G 15G 25G 38% /
2、如果还想看磁盘分区情况,用fdisk -l命令查看,如我的:
[root@localhost /]# fdisk -l
Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 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: 0x0001adbb
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 1026047 512000 83 Linux
/dev/vda2 1026048 83886079 41430016 83 Linux
Disk /dev/vdb: 32.2 GB, 32212254720 bytes, 62914560 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