Ln command: ln command is used to establish hard links and symbolic links.
Hard link:
$ Ln file1 file2
$ Cat file1 file2
We can see that file2 is exactly the same as file1. If you delete the file file1, the file file2 still exists. If you delete file2, the file file1 still exists. If you modify any file, the other file will be updated accordingly.
Symbolic Link:
$ Ln-s file1 file2
The difference between a symbolic link and a hard link is that a symbolic link only points to the name of the original file. If a symbolic link is deleted, the original file will not change. If you delete the original file, the symbolic link is useless.
A symbolic link has another advantage over a hard link: You can use a symbolic link to point to a word directory in the OpenLinux file system.
If you want to create a hard link to the subdirectory/usr/local/games,
$ Ln/user/local/games play
The ln command displays the error message and exits.
However, you can use symbolic links.
$ Ln-S/usr/local/games play
Now, you do not need to enter a command that is as long as the following:
$ CD/suer/local/games
You only need:
$ CD paly
Hard link disadvantage: cannot link to folders, cannot cross-filesystem.