Hard Link Concepts
A hard link, also called a link, is one or more filenames of a file
After the hard link is established, the source file and the link file are synchronized, and any one of the files will be modified.
Create links to save space, just maintain link relationships and don't need to copy files
the essential difference between hard and soft links a hard link can be thought of as a file with two filenames, whereas a soft link is a system that creates a new linked file that points to the limitations of hard links to the files it refers to.
- Soft links can cross file systems; hard links cannot be
- Soft links can be linked to a nonexistent file; hard links cannot be
- Soft links can be connected to the directory, hard links can not
Soft links overcome the limitations of hard links. Based on this, focus on soft links. A soft link is also called a symbolic link, which is equivalent to a shortcut in Windows.
Create a soft link
Ln -S src_file Ln_file
Remove soft Links
RM Ln_file
Note : For catalog soft Practice level
RM Ln_dir is to remove soft links
RM ln_dir/is the deletion of files in directory Ln_dir, of course, the files in the source directory will also be deleted (synchronous)
Linux hard links and soft links