Differences between Linux hard links and soft links, linux links and soft links

Source: Internet
Author: User

Differences between Linux hard links and soft links, linux links and soft links

1. The hard-link file and the original file point to the same data. The two are like clones, and the inode number is the same. When the original file is deleted,
The hard link file is still valid. However, hard-link files are different from file replication. It should be said that the hard link file is generated only by the original file

When the contents of the directory file change, the data of the original file is not copied, but the copied file has two copies of data on the disk. Simple

Hard links are similar to aliases. When the original name does not exist, the alias can still be used.

2. The Shortcut of the soft connection is the same as that of the windows system. The soft link is different from the inode of the original file. The content of this file refers

The path to the original file. Soft links are like pointers. Hard links are references.

Conclusion: hard links are similar to references of C ++, and soft links are similar to pointers of C ++.

Inode (I node) Detailed parsing see: http://www.cnblogs.com/itech/archive/2012/05/15/2502284.html

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.