Linux commands: Mkfs, MKE2FS, Blkid, E2label, TUNE2FS, DUMPE2FS, fsck, e2fsck

Source: Internet
Author: User

MKFS Introduction to Commands:

Create a Linux file system and re-create the file system to corrupt the original file.

File system type Mkfs-t ext2 =mkfs.ext2

Mkfs.ext3=mkfs-t ext3 mkfs-t vfat =mkfs.vfat

EXT2 EXT3 EXT4 FAT32

1 . Command format:

USAGE:MKFS.EXT2 [-c|-l filename] [-B block-size] [-F fragment-size]

Mk fs.ext3=mkfs-t ext3 mkfs-t vfat =mkfs.vfat

2 . Command function:

Create a file system and format the hard disk.

3 . Command parameters:

-T EXT3/DEV/SDA5 format partition SDA5 to EXT3 format

Commands that specialize in managing EXT series files: mke2fs

-j: Creating a ext3 Type file system

-B Size: Specifies the block size, which defaults to 4096; the available value is 1024,2048.

-L LABEL: Specifies the partition volume label;

-M #: Specifies the percentage of blocks reserved for super users

-I #: To specify how many bytes of space to create an inode, default to 8192,

The values given here should be 2 times the size of the block n times;

-N #: Specifies the number of inode;

-F: Force file system creation;

-E: Used to specify additional file system types;

blkid: Used to query or view the related properties of a disk partition Blkid/dev/sda5

[Email protected] test]# BLKID/DEV/SDA5

/dev/sda5:uuid= "550e1481-68da-44ea-b928-d3d2bf751da0" type= "Ext4"

E2label: Used to view or define volume labels

[[email protected] test]# E2LABEL/DEV/SDA5 here sda5 not set label


E2label: Device file volume label name change partition device volume label

[[email protected] test]# E2LABEL/DEV/SDA5 hellsda5 set New Volume label

[Email protected] test]# E2LABEL/DEV/SDA5

HELLSDA5 has set the new label.

tune2fs: Adjusting the file system's related properties

-j: No damage to the original data, the EX2T upgrade to ext3 (can not be lowered) tune2fs-j/dev/sda5

-L LABEL: Sets or modifies the volume label Tune2fs-l volume label/dev/sda5

-M #: Adjust the reserved percentage;

-R #: Specifies the number of reserved blocks;

-O: Set default mount Options

ACL default mount support ACL

-C #: Specifies that the mount count reaches # times after the self-test, 0 or 1 means to turn off this function;

-I #: The number of days to use per mount after self-test, 0 or 1 means to turn off this feature;

-L: Displays information stored in the Super block; Tune2fs-l/dev/sda5

DUMPE2FS: Displays detailed information about the file system;

Dumpe2fs/dev/sda5

-H: Displays only information stored within the Super block; Dumpe2fs-h/dev/sda5

fsck: Checking and repairing the Linux file system

-T type: Specifies that the file system type is fixed and does not specify that the current file system type will be selected automatically

-A: Automatically repair the file system, if not add-a each step will prompt whether to execute.

e2fsck: Dedicated to repairing Ext2/ext3 file system

-F: mandatory detection;

-P: Automatic repair;


4 . Command instance:

1. mkfs-t file type hard disk partition format a hard disk partition into a format

MKFS-T ext3/dev/sda2 Format the partition SDA2 partition as ext3 format.

2, mke2fs-j-B 2048/dev/sda5 format the SDA5 partition as ext3 format and specify a block size of 2048

3, mke2fs-m 3/dev/sda3 reserved 3% of the capacity block for the super-user use.





This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1867108

Linux commands: Mkfs, MKE2FS, Blkid, E2label, TUNE2FS, DUMPE2FS, fsck, e2fsck

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.