创建symbolic link
# ln -s target symbolic_link_name
例如:
# ln -s /root/deploy_ws/jre1.9.0/lib/i386/libnpjp2.so /usr/lib/firefox/plugins/libnpjp2.so (在linux上jre不用安装,直接解压就可以,但这样在firefox中无法检测到java plugin插件,所以需要手动创建链接)
查看symbolic link
# ls -l /usr/lib/firefox/plugins/libnpjp2.so
lrwxrwxrwx 1 root root 45 May 18 21:50 /usr/lib/firefox/plugins/libnpjp2.so -> /root/deploy_ws/jre1.9.0/lib/i386/libnpjp2.so
对于symbolic link来说,权限的第一个字符是l
删除symbolic link
# rm -r /usr/lib/firefox/plugins/libnpjp2.so
这个删除不会影响原位置的文件/root/deploy_ws/jre1.9.0/lib/i386/libnpjp2.so /usr/lib/firefox/plugins/libnpjp2.so
输出当前目录中symbolic link
# ls -l | grep "^l" | awk '{ print $8 }'
22:57
23:02
# find . -type l -print
./libnpjp2.so
./i386
# ls -l libnpjp2.so | awk '{print $11}' //有的系统中是$10 有的是$11
/usr/lib/firefox/plugins/libnpjp2.so
# readlink libnpjp2.so
/usr/lib/firefox/plugins/libnpjp2.so