Soft links and hard links in Linux
What is a linked file?
1, Hard link: Multiple files point to the same inode with different paths to each other as hard links.
2, Soft Link: (Memory size is a string unit)
the Inode has no data, just stores a path string and finds the path to the file.
* the number of hard links, less than or equal to 1 , files can be completely deleted
file is not easy to delete when greater than 1
ln [-s-v] SRC DEST
-S Create soft links
-V Show creation process
No option means to create a hard link
Create a hard link
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7E/68/wKioL1b-TZXwuVfzAAJ6RySN4-c594.jpg "title=" 143534.JPG "alt=" Wkiol1b-tzxwuvfzaaj6rysn4-c594.jpg "/>
ABC is the same as the inode number of the DEF after the link is created .
Create a soft link
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/7E/68/wKioL1b-TbyQjxXOAAIcKTZrxVs136.jpg "title=" 234. JPG "alt=" Wkiol1b-tbyqjxxoaaicktzrxvs136.jpg "/>
Summarize
Hard Links:
1. can only be created on files, cannot be applied to the directory
2. cannot be implemented across file systems
3. Creating a hard link increases the number of times a file is linked
Symbolic links (Soft links)
1. can be applied to the directory
2. can cross file system
3. do not increase the number of links to linked files
4. its size is the number of characters that the specified path contains
Soft links and hard links in Linux