- [root@yuzuki cj]# fdisk /dev/sde
- Welcome to fdisk (util-linux 2.21.2).
- Changes will remain in memory only, until you decide to write them.
- Be careful before using the write command.
- Command (m for help): n
- Partition type:
- p primary (0 primary, 0 extended, 4 free)
- e extended
- Select (default p):
- Using default response p
- Partition number (1-4, default 1):
- Using default value 1
- First sector (2048-31334399, default 2048):
- Using default value 2048
- Last sector, +sectors or +size{K,M,G} (2048-31334399, default 31334399):
- Using default value 31334399
- Partition 1 of type Linux and of size 15 GiB is set
- Command (m for help): t
- Selected partition 1
- Hex code (type L to list codes): c
- Changed system type of partition 1 to c (W95 FAT32 (LBA))
- Command (m for help): w
- The partition table has been altered!
- Calling ioctl() to re-read partition table.
- WARNING: If you have created or modified any DOS 6.x
- partitions, please see the fdisk manual page for additional
- information.
- Syncing disks.
- [root@yuzuki cj]# mkfs.vfat /dev/sde1
- mkfs.vfat 3.0.12 (29 Oct 2011)
- [root@yuzuki cj]# mount /dev/sde1 /external
- [root@yuzuki cj]# echo foobarbaz > /external/file
- [root@yuzuki cj]# less /external/file
- foobarbaz
- /external/file (END)
- [root@yuzuki cj]# umount /dev/sde1
- [root@yuzuki cj]# cat /dev/sde1 | grep -a foobarbaz
- foobarbaz