cenos7创建删除软连接ln -s

创建软链接

ln -s [源文件或目录] [目标文件或目录]

rm –rf 软链接名称(请注意不要在后面加”/”
例:

[root@master aaa]# ll
total 12
drwxr-xr-x 2 root root 4096 Aug 19 10:06 bb
drwxr-xr-x 2 root root 4096 Aug 19 10:00 cc
drwxr-xr-x 2 root root 4096 Aug 19 09:49 dd
lrwxrwxrwx 1 root root   13 Aug 19 10:07 ee -> /home/aaa/bb/
[root@master aaa]# rm -rf ee
[root@master aaa]# ll
total 12
drwxr-xr-x 2 root root 4096 Aug 19 10:06 bb
drwxr-xr-x 2 root root 4096 Aug 19 10:00 cc
drwxr-xr-x 2 root root 4096 Aug 19 09:49 dd
[root@master aaa]# ln -s /home/aaa/bb/ ./ee
[root@master aaa]# ll
total 12
drwxr-xr-x 2 root root 4096 Aug 19 10:06 bb
drwxr-xr-x 2 root root 4096 Aug 19 10:00 cc
drwxr-xr-x 2 root root 4096 Aug 19 09:49 dd
lrwxrwxrwx 1 root root   13 Aug 19 10:23 ee -> /home/aaa/bb/

上一篇:浅析Linux文件(二)日志文件详解


下一篇:Tomcat启动出现中文乱码的解决方案