创建符号链接文件
ln
命令用来链接文件,例如:将 /tmp/sylixos
链接到 /sylixos
[root@sylixos:/root]# help ln
create a symbol link file (must use -s).
eg. ln -s /tmp/dir /dir
ln [-s | -f] [actualpath] [sympath]
[root@sylixos:/root]# ll
-rw-rw-rw- root root Mon May 29 20:44:24 2023 4805 B, test2
-rw-rw-rw- root root Mon May 29 19:22:19 2023 130KB, test
total items: 2
[root@sylixos:/root]# ln test test-ln
[root@sylixos:/root]# ll
lrwxrwxrwx root root Thu Jun 29 15:04:58 2023 test-ln -> test
-rw-rw-rw- root root Mon May 29 20:44:24 2023 4805 B, test2
-rw-rw-rw- root root Mon May 29 19:22:19 2023 130KB, test
total items: 3
[root@sylixos:/root]# ls
test-ln test2 test
[root@sylixos:/root]#