- 論壇徽章:
- 0
|
在redhat中用什么命令看磁盤分區(qū)的文件系統(tǒng)類型?
呵呵,謝謝樓上各位,我來總結(jié)一下:
fdisk -l不復(fù)雜,但是看不到文件系統(tǒng)類型,只能看到分區(qū)類型,以Redhat 9為例:
[root@redhat9 root]# fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1012 8024467+ 83 Linux
/dev/sda3 1013 1044 257040 82 Linux swap
df -Tk是可以的,不過df -Th更友好一些,容量大小是以易讀的方式顯示的,而且它是顯示所有分區(qū),并不是一個分區(qū)。這個命令最方便。
[root@redhat9 root]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext3 7.6G 2.3G 4.9G 32% /
/dev/sda1 ext3 99M 9.3M 85M 10% /boot
none tmpfs 62M 0 62M 0% /dev/shm
parted倒是有點復(fù)雜了,因為它的功能很強(qiáng),redhat 9中的parted不支持-p參數(shù),但是用parted命令進(jìn)入后可以用p命令顯示出當(dāng)前的磁盤分區(qū)和文件系統(tǒng)情況:
# parted
GNU Parted 1.6.3
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
Using /dev/sda
Information: The operating system thinks the geometry on /dev/sda is 1044/255/63. Therefore,
cylinder 1024 ends at 8032.499M.
(parted) p
Disk geometry for /dev/sda: 0.000-8192.000 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 101.975 primary ext3 boot
2 101.975 7938.369 primary ext3
3 7938.369 8189.384 primary linux-swap |
|