cenos7创建删除软连接ln -s
程序员文章站
2024-02-26 13:57:04
...
创建软链接
ln -s [源文件或目录] [目标文件或目录]
rm –rf 软链接名称(请注意不要在后面加”/”
例:
[[email protected] 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/
[[email protected] aaa]# rm -rf ee
[[email protected] 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
[[email protected] aaa]# ln -s /home/aaa/bb/ ./ee
[[email protected] 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/
下一篇: ASP.NET如何获取两个日期之间的天数