1) By default without parameters, the LN command creates a hard link, and the ln command with the-s parameter creates a soft link.
2) The hard link file is the same as the Inode node number of the source file, and the Inode node number of the soft link file is different from the source file.
3) The LN command cannot create a hard link to a directory, but it can create soft links that are often used for soft links to directories.
4) Delete the soft link file, the source files and hard-linked files have no effect;
5) Delete the hard-link files of the files, the source files and linked files have no effect;
6) Delete the source file of the linked file, no impact on the hard link, will cause its soft link failure (red white blinking)
7) Delete the source file and its hard link file, the whole file will be deleted.
8) The snapshot function in many hardware devices is similar to the principle of hard link.
9) Soft links can cross file system, hard links can not cross file system.
Attached: Two ways to create links are as follows:
Ln-s source File Link File # Create a soft link
ln source file Hard link File # Create hard link
This article is from "Xiao Li's Backyard" blog, please be sure to keep this source http://lee90.blog.51cto.com/10414478/1757415
The difference between soft links and hard links under Linux