Linux symbolic link and hard link

Source: Internet
Author: User

Linux symbolic link and hard link have file A. Now you need to create A new link to this file. You can choose symbolic link and hard link. The symbolic link is used to create A new file. The block of the new file stores the inode and the file name of directory A under directory B in the directory where directory A is located (assumed as Directory B, then, read the block of directory B through the inode of directory B, compare the file name of A, get the inode of A, and then read. Hard link only adds an inode of A and A file name of A in the block of the current directory file (which must be customized), and then reads the block of A through the inode of, however, there are two restrictions: one is not cross-filesystems, and the other is not linked to a directory: one is not cross-filesystems. It can be understood that it can be cross-filesystems. If the filesystem where hard link is located is mounted, the filesystem of the actual data is not mounted. Imagine what would happen. The file cannot be linked to a directory. Suppose there is a directory C. If it can be linked to a directory, add the inode of directory file C to the block in the current directory and the file name in the current directory. We can use inode of directory C to read the block in directory C, in this way, the inode and file name of the Directory files and files recorded in the directory files are obtained, and the files and files under the directory are read.

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.