码迷,mamicode.com
首页 > 系统相关 > 详细

linux 查看文件系统类型

时间:2015-08-01 06:23:11      阅读:391      评论:0      收藏:0      [点我收藏+]

标签:

1. mount

[op@TIM ~]$ mount
/dev/mapper/vg_tim-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda2 on /boot type ext4 (rw)
/dev/sda1 on /boot/efi type vfat (rw,umask=0077,shortname=winnt)
/dev/mapper/vg_tim-lv_home on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /sys/kernel/config type configfs (rw)
vmware-vmblock on /var/run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,default_permissions,allow_other)

 

2.df
[op@TIM ~]$ df -lhT
Filesystem           Type   Size  Used Avail Use% Mounted on
/dev/mapper/vg_tim-lv_root
                     ext4    50G   17G   30G  36% /
tmpfs                tmpfs  3.9G  232K  3.9G   1% /dev/shm
/dev/sda2            ext4   477M   73M  379M  17% /boot
/dev/sda1            vfat   200M  260K  200M   1% /boot/efi
/dev/mapper/vg_tim-lv_home
                     ext4   860G  726G   90G  90% /home

 

3. fdisk
[op@TIM ~]$ sudo fdisk /dev/sda
[sudo] password for op:

WARNING: GPT (GUID Partition Table) detected on ‘/dev/sda‘! The util fdisk doesn‘t support GPT. Use GNU Parted.


The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.

WARNING: DOS-compatible mode is deprecated. It‘s strongly recommended to
         switch off the mode (command ‘c‘) and change display units to
         sectors (command ‘u‘).

Command (m for help): c         
DOS Compatibility flag is not set

Command (m for help): u
Changing display/entry units to sectors

Command (m for help): p

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x2e31a2a6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

Command (m for help): q

4. file
[op@TIM ~]$ sudo file -s /devsda
/devsda: cannot open `/devsda‘ (No such file or directory)
[op@TIM ~]$ sudo file -s /dev/sda
/dev/sda: x86 boot sector; partition 1: ID=0xee, starthead 0, startsector 1, 1953525167 sectors, extended partition table (last)\011, code offset 0x0
[op@TIM ~]$ sudo file -s /dev/sda1
/dev/sda1: x86 boot sector, mkdosfs boot message display, code offset 0x3c, OEM-ID " mkdosfs", sectors/cluster 8, root entries 512, Media descriptor 0xf8, sectors/FAT 200, heads 255, sectors 409600 (volumes > 32 MB) , serial number 0x88645772, label: "           ", FAT (16 bit)
[op@TIM ~]$ sudo file -s /dev/sda2
/dev/sda2: Linux rev 1.0 ext4 filesystem data (needs journal recovery) (extents) (huge files)

 

5. parted

[op@TIM ~]$ sudo parted
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type ‘help‘ to view a list of commands.
(parted) p                                                                
Model: ATA ST1000DM003-1ER1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size   File system  Name  Flags
 1      1049kB  211MB   210MB  fat16              boot
 2      211MB   735MB   524MB  ext4
 3      735MB   1000GB  999GB                     lvm

(parted) q     

                          

6. 查看 fstab                                  
[op@TIM ~]$ cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Tue Mar 24 02:21:26 2015
#
# Accessible filesystems, by reference, are maintained under ‘/dev/disk‘
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_tim-lv_root /                       ext4    defaults        1 1
UUID=2ce8837b-3cdc-44f0-8b8f-63b64c32a5b9 /boot                   ext4    defaults        1 2
UUID=8864-5772          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
/dev/mapper/vg_tim-lv_home /home                   ext4    defaults        1 2
/dev/mapper/vg_tim-lv_swap swap                    swap    defaults        0 0
/dev/sdc1               /mnt/mobiledisk         ntfs-3g defaults    0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

linux 查看文件系统类型

标签:

原文地址:http://www.cnblogs.com/x113/p/4693532.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!