Linux创建一个快捷方式
ln软连接
软连接也叫做符号链接,类似于windows的快捷方式。
常用于安装软件的快捷方式配置,如python,nginx等
ln -s 目标文件 软连接名
1.存在文件/tmp/test.txt
[root@master tmp]# ls -l
-rw-r--r-- 1 root root 10 10月 15 21:23 test.txt
2.在/home目录中建立软连接,指向/tmp/test.txt文件
ln -s /tmp/test.txt my_test
3.查看软连接信息
lrwxrwxrwx 1 root root 13 10月 15 21:35 my_test -> /tmp/test.txt
4.通过软连接查看文件
cat my_test
my_test只是/tmp/test.txt的一个别名,因此删除my_test不会影响/tmp/test.txt,但是删除了本尊,
快捷方式就无意义不存在了
浙公网安备 33010602011771号