Inode exploration and the relationship between Inode and soft link and hard link

Source: Internet
Author: User

I. Documentation system-related knowledge

Superblock: Records The overall properties of this file system, including the total amount of inode/block, usage, amount remaining, and file system format and related information

Block: Record the contents of the file, if the file is too large, occupy multiple blocks

Inode: Record file properties, one file occupies one inode

The file system is generally divided into block groups (blocks group), each block group has superblock, file system description, block correspondence table, inode correspondence table, Inodetable,dateblock composition

1. (1) block size is not changed after formatting, unless reformatted

(2) Each block can only put one file of data

(3) block size has 1KB,2KB,4KB

2,. (1) inodetable is used to record the attributes of the file and the file is actually placed within the block

(2) Inode recording a block requires 4bytes

(3) Inode up to 12 direct points

(4) different file system inode size is not the same,

3.File System Description: Describes block numbers starting and ending for each block group

4.block Bitmap (Fast table): Used to modify block status in real time

5.inode Bitmap (inode table): Log used and unused inode codes

DUMP2FS Backup, view file system Information

Two. Soft links and hard links
ln source destination default is to establish a hard link

Ln-s source destination Creating soft links

    1. Hard links use detailed,

(1) Create a hard link to the/etc/crontab/root/crontab

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/85/3C/wKioL1edxcWBlCNdAAANWSzeMQw518.png "title=" 4.png " alt= "Wkiol1edxcwblcndaaanwszemqw518.png"/>

The number of links found increases by 1 and the remaining properties are unchanged

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/85/3C/wKioL1edxpyB5jNFAAKV2atxmDo668.png "title=" 2.png " alt= "Wkiol1edxpyb5jnfaakv2atxmdo668.png"/>

(2) Hard link cannot cross file system, cannot connect directory

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/85/3D/wKiom1edyF6jvrL6AAAInk9TLYU972.png "title=" 5.png " alt= "Wkiom1edyf6jvrl6aaaink9tlyu972.png"/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/85/3C/wKioL1edyLnCMAIiAAAEwcdMzhI812.png "title=" 6.png " alt= "Wkiol1edylncmaiiaaaewcdmzhi812.png"/>

2. Detailed use of soft links

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/85/3D/wKioL1ed373w7VFjAAAUMlNFiqA237.png "title=" 11.png "alt=" Wkiol1ed373w7vfjaaaumlnfiqa237.png "/>

When you create a soft connection, the so-called relative path is relative to the linked file, not the directory

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/85/3D/wKiom1ed4HXy7QGFAAH64Qrfto4776.png "title=" 3.png " alt= "Wkiom1ed4hxy7qgfaah64qrfto4776.png"/>


This article is from the "Hello" blog, so be sure to keep this source http://tianzhi.blog.51cto.com/11880607/1832523

Inode exploration and the relationship between Inode and soft link and hard link

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.