How to Fomat USB Pen In Linux

Question :

How  to  Format  USB  Pen  in Linux  ?

Answer :

First  Insert your  USB  pen in Linux  and  check the  name dvice  with fidsk -l  under  root

linux-ooju:~ # fdisk -l
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 / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1549f232
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   163842047    81817600    7  HPFS/NTFS/exFAT
/dev/sda3       163842048  1187883007   512020480    7  HPFS/NTFS/exFAT
/dev/sda4   *  1187885054  1953523711   382819329    f  W95 Ext'd (LBA)
/dev/sda5      1187885056  1802326015   307220480    7  HPFS/NTFS/exFAT
/dev/sda6      1802328064  1806540799     2106368   82  Linux swap / Solaris
/dev/sda7      1806542848  1848487935    20972544   83  Linux
/dev/sda8      1848489984  1953503231    52506624   83  Linux
Disk /dev/sdf: 257 MB, 257949696 bytes
8 heads, 62 sectors/track, 1015 cylinders, total 503808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd0bcd0bc
   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1      503439      251719+   6  FAT16

Now we  can that  the  USB pen  is /dev/sdf1

In  mij Actual  Linux Is , i  have USB contenets  under  /media

linux-ooju:~ # ls /media/E018-07AB/
gemini2-470-dm800-201002090910_8a8f8.rar  pli-enigma2-jade3-dm800-20091005-6705_8a8f8.rar  sp42471.exe
linux-ooju:~ #

 

Lets  Format in (ext3 or  ext4)

linux-ooju:~ # mkfs.ext3 /dev/sdf1
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
62992 inodes, 251716 blocks
12585 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
31 block groups
8192 blocks per group, 8192 fragments per group
2032 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801, 221185
Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information:
done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

To format as VFAT/FAT32 file system type the command:

# mkfs.vfat /dev/sdf1