ln
Command: Create a synchronized link to a file or directory in another location, similar to a hyperlink under Windows, and change the other file regardless of the change.
Use:
ln [-S] source file directory or location destination file directory or location
Example:
Ln-s/USR/LOCAL/RABBITMQ-SERVER-3.6.6/OPT/RABBITMQ
/OPT/RABBITMQ the directory to/usr/local/rabbitmq-server-3.6.6,
So when I visit the/OPT/RABBITMQ directory, it's equivalent to accessing the/usr/local/rabbitmq-server-3.6.6 directory.
Delete Link: rm-rf/opt/rabbitmq-use RM command.
Soft links and Hard links
A hard link means that a file can have multiple names, whereas a soft link creates a special file with the content of the file pointing to the location of another file.
Hard links exist in the same file system, but soft links can span different file systems.
Soft Links:
1. Soft links, in the form of a path exists. Similar to shortcuts in the Windows operating system
2. Soft links can cross file system, hard links can not
3. Soft links can link to a nonexistent file name
4. Soft links can be linked to the directory
Hard Links:
1. Hard link, in the form of a copy of the file. But does not occupy the actual space.
2. Do not allow the creation of hard links to the directory
3. Hard links can only be created in the same file system
Linux LN Soft and hard link commands