Hard links and soft connections for Linux (symbolic connections) __linux

Source: Internet
Author: User

1.Linux Link Concept
There are two kinds of Linux links, one is called hard link (Hard link), the other is called Symbolic link (symbolic link). By default, the LN command produces a hard link.

"Hard Connection"
A hard connection refers to a connection through an index node. In a Linux file system, a file stored in a disk partition is assigned a number, called an index node number (Inode index), regardless of its type. In Linux, multiple file names point to the same index node. Generally this connection is a hard connection. The effect of a hard connection is to allow a file to have multiple valid pathname, so that users can build hard connections to important files to prevent "accidentally delete" functionality. The reason for this is as described above because there is more than one connection to the index node of the directory. Deleting only one connection does not affect the index node itself and other connections, and only when the last connection is deleted will the file's data block and directory connections be freed. That is, the condition that the file is actually deleted is that all of the hard connection files associated with it are deleted.

"Soft Connection"
Another connection, called a symbolic connection (symbolic link), is also called a soft connection. Soft link files have shortcuts similar to Windows. It's actually a special file. In a symbolic connection, a file is actually a text file that contains the location information for another file. Two file names are different, the corresponding inode is not the same, but the contents of a file is another file path information, opened a equivalent to open another, equivalent to a shortcut.

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.