linux下链接有两种方式,硬链接和软链接,创建链接也有两种方式。. 其实我们也可以用cp命令创建链接文件 1234 [xiaofan@linuxboy ~]$ cp -l aa.txt bb.txt [xiaofan@linuxboy ~]$ ll -i aa.txt bb.txt 787611 -rw-rw-r--. 2 xiaofan xiaofan 0 May 28 23:20 aa.txt 787611 -rw-rw-r--. 2 xiaofan xiaofan 0 May 28 23:20 bb.txt 1234 [xiaofan@linuxboy ~]$ cp -s aa.txt cc.txt [xiaofan@linuxboy ~]$ ll -i aa.txt cc.txt 787611 -rw-rw-r--. 2 xiaofan xiaofan 0 May 28 23:20 aa.txt 787607 lrwxrwxrwx. 1 xiaofan xiaofan 6 May 28 23:23 cc.txt -> aa.txt 最后,关于创建硬链接,你得注意两个限制
(责任编辑:admin) |