and mke2fs mkfs command

1, mke2fs command

In the Linux system, mke2fs command can be used to create "ext2 / ext3" file system on the disk partition.

(1) grammar

mke2fs (option) (parameters)

(2) common options

-b <block size>: Specifies block size, in bytes.

-c: check for bad blocks.

-f <discontinuous segment size>: Specifies the size of the discontinuous section, in bytes.

-F: no matter what the specified device, enforce mke2fs.

-i <byte>: Specify "Byte / inode" ratio.

-N <inode number>: Specifies the number of inode to be established.

-l <File>: from the specified file, reads the file information block is damaged.

Set tag name of the file system: -L <label>.

-m <percentage>: reserved blocks assigned to the ratio of the administrator, the default is 5%.

-M: recording the last engaged directory.

-q: does not display any information when executed.

-r: ext2 file system version is specified to be created.

-R = <block number>: set the disk array parameters.

-S: write only superblock and group descriptors, without changing the inode able inode bitmap and bitmap.

-v: display detailed information when executed.

-V: Display version information.

(3) parameters

Device file: partition device file name of the file system to be created.

Blocks: the number of disk blocks the file system to be created.

(4) Examples

Create the specified ext2 file system:

$ sudo mke2fs –q /dev/hda1

2, mkfs command

In Linux systems, mkfs command is used on the device (typically the hard disk) to create Linux file systems, mkfs command itself does not establish the implementation of the file system, but to call the relevant procedures to implement.

(1) grammar

mkfs (option) (parameters)

(2) Common Option Description

-t <file system type>: Specifies the file system type to be created.

-v: Displays version information and detailed usage.

-V: display brief usage.

-c: Before you can create file systems, check whether the partition has a bad track.

(3) parameters

File System: device file name you want to create a file system corresponding.

Specifies the number of disk blocks the file system: number of blocks.

(4) Examples

Based on / dev / hda5 a msdos file system, and check for bad blocks exist, and the process detailing:

$ sudo mke2fs –q /dev/hda1

The / dev / sda6 formatted ext3 format, / dev / sda7 formatted ext2 format:

$ sudo mkfs –t ext3 /dev/sda6
$ sudo mkfs –t ext2 /dev/sda7

 

Guess you like

Origin www.cnblogs.com/Cqlismy/p/11366201.html