Linux inode, Symbolic link, physical link

Source: Internet
Author: User
  1. The inode is the structure of the saved file attribute in Linux and the actual contents of the file are stored in the block. The address information for the block of the file is stored in the inode.

  2. You can use the command Ll-di file_path to view the inode of a file/directory. (When the operating system looks for files, it is also based on the file's directory-level lookup of the inode.) The block information for the current directory's subdirectory information is also in the inode of the current directory)

  3. The block information that holds the file in the inode of the file, whether the block information is the actual block address of the file or the block information of the other inode determines whether the file is a physical link to the file or a symbolic link. 1 is a good illustration:

  4. In real programming, opening a file in a process returns an integer file descriptor that is not an inode, but rather a subscript for a file table in the system that stores the inode location of the file. When you fork a sub-process, you simply copy the index to the child process, and the inode and the System File table are the same. This means that the child process is shared with the parent process on the file.

    fd_father-> File Table->inode->block

    ^

    Fd_son--------

  5. Hard Links: Multiple filenames can point to the same inode.

  6. Figure 1:

    Physical links

    Symbolic Links



Linux inode, Symbolic link, physical 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.