1、定義
軟鏈接:是指向另一個文件的一個文件。
作用:軟鏈接就相當於windows下的快捷方式,當分區磁盤滿了的時候,經常會使用軟鏈接的方式把文件夾掛盤到其他比較大的磁盤上
2、怎麼創建軟鏈接
舉例:把Soft_links 鏈接到 /home/lll/
意思就是進入Soft_links文件夾就會直接訪問到了/home/lll/文件夾下的文件
Soft_links鏈接到/home/lll/ ,當lll變化時,Soft_links會同步變化
(備註:用此命令時Soft_links文件夾當前不存在,使用該命令時會新建)
ln -sf /home/lll/ Soft_links
#使用ll查看鏈接結果
[root@localhost home]# ll
總用量 0
drwxr-xr-x. 2 root root 76 8月 1 22:04 jsonTest
drwxr-xr-x 2 root root 21 11月 24 15:26 lll
drwxr-xr-x. 2 root root 36 7月 21 16:43 nodejs_test
lrwxrwxrwx 1 root root 10 11月 24 15:35 Soft_links -> /home/lll/
drwxr-xr-x. 2 root root 199 7月 13 16:39 test
drwxr-xr-x 5 root root 79 10月 26 15:46 tmp
3、怎麼刪除上述創建的軟鏈接呢
注意不要刪錯了哦
rm Soft_links