1.fdisk -l
Disk /dev/sda: 120.0 GB, 120034123776 bytes =>硬盤(pán)容量120G
255 heads, 63 sectors/track, 14593 cylinders =>255個(gè)磁頭,63個(gè)扇區(qū),14593個(gè)柱面
Units = cylinders of 16065 * 512 = 8225280 bytes =>每個(gè)柱面的容量是 8225280
=>存儲(chǔ)容量=磁道(柱面)數(shù)×磁頭數(shù)×每道扇區(qū)數(shù)×每扇區(qū)字節(jié)數(shù)
14593×255×63×512=111.788G
柱面容量=磁頭數(shù)×每道扇區(qū)數(shù)×每扇區(qū)字節(jié)數(shù) 255×63×512=8225280 B
實(shí)際上硬盤(pán)廠家通常是按照1G=1000計(jì)算的
Disk identifier: 0xc3ffc3ff
Device Boot Start End Blocks Id System =>start 表示的一個(gè)分區(qū)從X cylinder開(kāi)始
/dev/sda1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/sda2 3825 10199 51200000 7 HPFS/NTFS
/dev/sda3 10200 12596 19253902+ 5 Extended
/dev/sda4 12597 14593 16040902+ 12 Compaq diagnostics
/dev/sda5 10200 10211 96358+ 83 Linux
/dev/sda6 10212 10454 1951866 82 Linux swap / Solaris
/dev/sda7 10455 11548 8787523+ 83 Linux
/dev/sda8 11549 12596 8418028+ 83 Linux
2.df:通過(guò)這個(gè)命令可以查看磁盤(pán)的使用情況以及文件系統(tǒng)被掛載的位置
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda7 8649544 1986948 6223220 25% /
tmpfs 1033648 0 1033648 0% /lib/init/rw
udev 10240 136 10104 2% /dev
tmpfs 1033648 0 1033648 0% /dev/shm
/dev/sda5 93307 19997 68493 23% /boot