Eight. Disk and file System management

Source: Internet
Author: User

Fdisk, MKFS, MKE2FS, Mkswap, DUMPE2FS, TUNE2FS, E2label, fsck, E2fsck, Blkid, DF, du, Ln

1. common File System types

Linux:ext2,ext3,ext4,xfs,btrfs,swap,reiserfs,jfs

Windows:fat32,ntfs

Unix:ffs,ufs,jfs2

Network: Nfs,cifs

2. File system components

Modules in the kernel: ext4,xfs,vfat

Administrative Tools for user space: Mkfs.ext2,mkfs.xfs

3.Linux virtual file system: VFS

4. View system-supported file systems: Cat/proc/filesystems

5. View the modules loaded by the kernel: lsmod

6. Fdisk

(1) Fdisk-l View all disk devices

(2) Fdisk device partition device via interactive interface

A toggle a bootable flag

b Edit BSD Disklabel
C Toggle the DOS compatibility flag
D Delete a partition
L list known partition types
M Print this menu
n Add a new partition
o Create a new empty DOS partition table
P Print the partition table
Q Quit without saving changes
s create a new empty Sun Disklabel
t change a partition ' s system ID
U Change display/entry units
V Verify the partition table
W Write table to disk and exit
X Extra functionality (experts only)

7. MKFS-BUIKD a Linux filesystem

MKFS.EXT3, MKFS.EXT4, Mkfs.fat, Mkfs.vfat, MKFS.XFS, Mkfs.btrfs

MKFS [Options] DEVICE

-T Fs_type

-L LABEL

8. Mke2fs-create an EXT2/EXT3/EXT4 filesystem

MKE2FS [Options] DEVICE

-T Fs_type

-L LABEL

-N # Create a # Inode

-M # Percentage of space reserved for administrators

-O feature/^feature Enable/disable specified attribute

-B Block Size

9. Creation and formatting of swap partitions

A. Creating a swap partition with FDISK device and specifying an ID of 82

B. Formatting partitions using Mkswap device

C. Enable swap partition Swapon device, turn off swap partition to Seapoff device

Ten. Dumpe2fs-dump EXT2/EXT3/EXT4 filesystem Information

-H View information only for Super block Superblock

TUNE2FS-View or modify information for the EXT series file system

TUNE2FS [Options] DEVICE

-l equivalent to dumpe2fs-h DEVICE

-L LABEL

-M # Modify the percentage of reserved space

-j Upgrade ext2 to Ext3

-O Adjust file system default mount options

-O File System properties enable or disable
-U uuid modifies the UUID number

E2lable.

E2label DEVICE View Devicle's label

E2label DEVICE label setting devicle lable as Label

Fsck-check and repair a Linux file system

Fsck, Fsck.ext3, FSCK.EXT4, Fsck.vfat ...

fsck [Options] DEVICE

-F Force

E2fsck-check a Linux ext2/ext3/ext4 file system

-Y assume an answer of ' yes '

-F Force

Blkid. View file system uuid, LABEL, Filesytem Type

Cat/proc/partitions viewing the file system loaded in the kernel

Partprobe loading partitions into the kernel

Df-report FileSystem disk space usage

DF [Options] [directories], with directory, lists the partition where the directory resides

-A,--all

-H,--human-readable

-I.,--inode

-T,--printe-type

. du-estimate File Space usage

du [Options] [directories]

-A,-all, list all files, not just directories

-H,--human-readable

-S,--summarize

Ln-make links between files

ln [options] TARGET link_name

-S,--symbolic

Cp,mv,ln.

CP re-adds new inode and block, and updates inode number and filename to block in the same directory
The MV updates the original inode number and the corresponding new file name to the directory block and removes the inode number and file name from the block in the original directory.
Hard link updates the file inode number and new file name to the directory block
Symbolic link connects to the block of the connected directory

Eight. Disk and file System management

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.