Linux 查看 flash 分区命令
## /proc/mtd
可以显示出所有挂载和未挂载的分区,但不显示文件系统类型。
```
cat /proc/mtd
mtd0: 00080000 00020000 "MLO"
mtd1: 00200000 00020000 "U-Boot"
mtd2: 00580000 00020000 "Kernel"
mtd3: 00800000 00020000 "File System"
mtd4: 07000000 00020000 "app"
```
## df
可以查看已经挂载的分区和文件系统类型。
```
df -a
Filesystem 1K-blocks Used Available Use% Mounted on
ubi0:rootfs 4584 4576 8 100% /
devtmpfs 127488 0 127488 0% /dev
ramfs 0 0 0 0% /var
ramfs 0 0 0 0% /tmp
proc 0 0 0 0% /proc
sysfs 0 0 0 0% /sys
devpts 0 0 0 0% /dev/pts
tmpfs 127592 0 127592 0% /dev/shm
ubi1_0 89796 32 89764 0% /app
```
## fdisk
可以显示出所有挂载和未挂载的分区,但不显示文件系统类型。
```
fdisk -l
Disk /dev/mtdblock0: 0 MB, 524288 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock0 doesn't contain a valid partition table
Disk /dev/mtdblock1: 2 MB, 2097152 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock1 doesn't contain a valid partition table
Disk /dev/mtdblock2: 5 MB, 5767168 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock2 doesn't contain a valid partition table
Disk /dev/mtdblock3: 8 MB, 8388608 bytes
255 heads, 63 sectors/track, 1 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock3 doesn't contain a valid partition table
Disk /dev/mtdblock4: 117 MB, 117440512 bytes
255 heads, 63 sectors/track, 14 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mtdblock4 doesn't contain a valid partition table
```
页:
[1]