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