Soft links
Soft links in Linux are like shortcuts in Windows systems
Create soft link format: ln-s source file full path soft connect full path
Operation Demo:
Hard Links
Hard link and soft connection, it is equivalent to the image of the source file, the source file changes, the hard link file will also change, similarly, the hard link file changes, the source file will also change
Create hard-Link format: ln source file full path soft link full path
The-s parameter is less than creating a soft-link format
Operation Demo:
Difference:
Soft links are clearly different from hard links created.
1, Soft link is a link file, so the file size is very small
2. Hard links are the same size as source files
3. Hard links cannot span partitions
4, hard links can not be used in the directory
What is the reason why a hard-link file synchronizes with its source files?
View the hard link file with the I node of the source file and find their I node the same. The Linux operations file is through the I node, an I node mapped to two files, modify one of the files, and of course, the other has been modified.
Linux soft connect with hard links