在命令行下使用什么命令能显示出各分区的文件系统?
我想在分区没有挂载前,在命令行下查看各分区的文件系统是ext2,vfat还是ext3.请问使用什么命令能实现这项功能!
mount fdisk -l /dev/hda (or /dev/sda for SATA harddisk) 我的fdisk -l 已经一年 没有显示啦。。不知道啥原因 :x:x fdisk -l /dev/hda (or /dev/sda for SATA harddisk)
斑竹,我试了,还是看不到是何种文件系统。
这在挂载时,太费事了。因为每次都得先弄清是什么文件系统。
能不能再帮忙想个好办法。
先谢了! 先搞清楚各个文件系统类型,然后把挂载命令写入/etc/fstab中.这样每次都自动挂载,不用你再逐个用命令了,这样行吗? 还有这里看到一篇文章,我引用过来看看,或许有些帮助:
(1)fdisk -l /dev/hda
# fdisk -l /dev/hda
Disk /dev/hda: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
/dev/hda1 * 1 13 104391 83Linux
/dev/hda2 14 320025599577+83Linux
/dev/hda3 3201 4156 7679070 83Linux
/dev/hda4 4157 4998 6763365 fWin95 Ext'd (LBA)
/dev/hda5 4157 4793 5116671 83Linux
/dev/hda6 4794 4920 1020096 83Linux
/dev/hda7 4921 4998 626503+82Linux swap
(2)mount
# mount
/dev/hda3 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/hda2 on /ftproot type ext3 (rw)
/dev/hda5 on /lfs type ext3 (rw)
/dev/hda6 on /www type ext3 (rw)
(3)parted
# 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/hda
Information: The operating system thinks the geometry on /dev/hda is
4998/255/63.Therefore, cylinder 1024 ends at 8032.499M.
(parted) print
Disk geometry for /dev/hda: 0.000-39205.687 megabytes
Disk label type: msdos
Minor Start End Type FilesystemFlags
1 0.031 101.975primary ext3 boot
2 101.97525101.562primary ext3
3 25101.56232600.654primary ext3
4 32600.65439205.502extended lba
5 32600.68537597.434logical ext3
6 37597.46538593.652logical ext3
7 38593.68339205.502logical linux-swap
(4)stat -f file
# stat -f 1.c
File: "1.c"
ID: 0 Namelen: 255 Type: ext2/ext3
Blocks: Total: 1889600 Free: 142799 Available: 46811 Size: 4096
Inodes: Total: 960992 Free: 849089
(5)file -s /dev/hdaN
# file -s /dev/hda1
/dev/hda1: Linux rev 1.0 ext3 filesystem data (needs journal recovery)
(6)df -T
# df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/hda3 ext3 7558400 6987204 18724498% /
none tmpfs 62324 0 62324 0% /dev/shm
/dev/hda2 ext3 2519725221128964 278831289% /ftproot
/dev/hda5 ext3 5036284 339288 4441164 8% /lfs
/dev/hda6 ext3 1004024 16428 936592 2% /www
可以看到.很多必须是挂载以后才能看到的~
不过这些东西很有用~也挺有意思~ 谢谢楼上的各位!
页:
[1]