The relationship between iNode and block
After partitioning, a file is divided into iNode and block,block to store data, such as pictures, videos, etc. Inode is responsible for storing the properties of the file, but does not include the file name. The relationship between iNode and block is like the contents and contents of a book. A file must have at least one iNode and one block.
Disk is read according to block, block is too large or too small is not very good, block is too large, although the reading rate is high, but waste space, block saves space, but the read and write performance is not good!
In a production environment, we usually choose a large block for large files and a small block for small files. Block has 1k, 2k, 4k, and usually defaults to 4k.
The difference between hard links and soft links:
Hard links are the same iNode node, different files, delete hard links, or one of the source file entities cannot be deleted. After the hard link entities are deleted, the space will be occupied by other files.
Soft links, also known as symbolic links, are different iNode nodes, with the same file content, delete the source file, the symbolic link is also automatically deleted.