Hard link Soft Connect

Source: Internet
Author: User

Link: Access different paths to the same file

Hard Links: points to different paths to the same inode.

Characteristics:

1. Hard links cannot span partitions.

2. You cannot create a hard link to a directory.

3. After creating a new link, ll view the number of connections will increase


Soft Links: points to different paths to the same file.

Characteristics:

1, hard links can cross the file system

2, hard links can be created on the directory, and the number of links to a directory of at least 2, create links to the source file does not increase the number of connections.

PS: The directory itself is a link, and there is a "." in the directory. File, which is specified as the current directory, for example:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/85/28/wKiom1ebGHayd0qYAAAlURkmF9A182.png "title=" 1.png " alt= "Wkiom1ebghayd0qyaaalurkmf9a182.png"/>

As shown in: The Inode of a directory and the "." In the A directory Inode consistent, all directories have at least two links, if you want to continue to create n directories in the A directory, each directory contains a "..", the inode number is also the same as a, so create n files will have n+2 link number.

3. The link file and the original file have different inode numbers

4. Deleting a linked file does not affect the source file, but if the linked file is programmed red after deleting the source file, create a file that matches the original file name directly in the source file directory.

5, Soft link file, the path of the original file if the relative path must be relative to the path of the soft connection file, not relative to the current working directory path

Hard link Soft Connect

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.