In a Linux system, there are two kinds of links: one is called hard link (hardlink), the other is called symbolic link or soft link (symbolic).
1 ) How to create :
a ) By default without parameters, LN The command creates a hard link, and the ln command with the-s parameter creates a soft link.
2 ) meaning :
a ) hard-link files and source files Inode Node number is the same , and a soft link file is equivalent to a shortcut under Windows (the Inode node number differs from the source file)
3 ) features :
a You cannot create a hard link to a directory, but you can Create a soft link , a soft link to the directory is often used
b Soft links can cross file systems, hard links can not cross file systems. ,
4 why not (source files, soft links, hard links with delete)
a ) Delete the soft link file, the source files and hard-linked files have no effect;
b) Delete the hard-link file of the file, the source files and soft link files have no effect;
c) Delete the source file of the linked file, no impact on the hard-link file, it will cause its soft link failure (red white blinking);
d) while deleting the source file and its hard-linked file, the entire file will be "truly " the deletion
The difference between a soft link and a hard link under Linux