Linux-the process by which the operating system looks for files and the difference between hard and soft links

Source: Internet
Author: User

Example: The system to find the file/var/log/messages process

The kernel knows the inode number, according to the inode can be found/corresponding disk block, the disk block has/below the directory and corresponding inode number, and then according to the Var inode number to find the corresponding disk block Var, which contains the log directory corresponding inode number, Then we find the disk block of log according to the inode number of log, then find the messages corresponding disk block according to the inode number of the message, that is to find the messages file

Hard Links

Access 2 paths of the same file with the same inode number and the same file size

Soft links

Example:/etc/test------>/usr/local/test

/disk block is not the directory and the corresponding inode number, but a pointer to/usr/local/test, and then the system to find/usr/local/test

Linux-the process by which the operating system looks for files and the difference between hard and soft links

Related Article

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.