[Linux] Understand system files with one picture

First, understand the disk structure

Insert image description here

System file distribution map

Insert image description here

File search

Insert image description here

File deletion

The addition, deletion, modification and checking of files are all inodedone around, so when we want to delete a file, we only need to inodeget its corresponding block bitmapdata inode bitmapblock container and set the location where the file attributes are saved to 0. If you want To restore, set it to 1 through a certain method.

requires attention

The inode determines the grouping. The inode number can only be used within this partition and cannot be used across partitions.
A series of operations such as partitioning, grouping, and filling in attributes are all completed by the system itself.
In operation, we will also encounter that in a group, the data blocks are not used up, but the inodes are used up, and the inodes are not used up, but the data blocks are used up.

Guess you like

Origin blog.csdn.net/wh9109/article/details/132478849