Command format:
ln [parameter] [source file or directory] [destination file or directory]
Necessary parameters:
-B Delete, overwrite previously established link
-D allows super users to make hard links to directories
-F Force Execution
-I interactive mode, file presence prompts the user whether to overwrite
-N treats symbolic links as generic directories
-S soft link (symbolic link)
-V displays detailed processing procedures
Example 1: Create a soft link to a file
Ln-s Log2013.log link2013
Description
Create soft link link2013 for Log2013.log file, link2013 will expire if Log2013.log is lost
Example 2: Create a hard link to a file
ln Log2013.log ln2013
Description
Create a hard link for log2013.log ln2013,log2013.log the same as the properties of ln2013
Example 4: Link a file to the same name in another directory
ln Log2013.log test3
Example 5: Creating a soft link to a directory
Ln-sv/opt/soft/test/test3/opt/soft/test/test5
Description
1. Directories can only create soft links
2. Directory creation link must use absolute path, relative path creation will not be successful, will prompt: The number of layers of the symbolic connection too many such errors
3. modifying files in the target directory of the link changes synchronously in the source file directory
Linux command (+): ln command