Command: LN
Features: Linux under the file link function, the difference, soft link requires-s option, hard link does not need. The same is, all synchronous changes, but soft links do not need to occupy space, hard links occupy space
Usage: Soft Link: ln-s source file Destination file
Hard Link: ln source file Destination file
eg
[Email protected]6380-mt:~/test1$LNRen.. /test2/ren #硬链接 [email protected]-hp-compaq-pro-6380-mt:~/test1$ [email protected]-hp-compaq-pro-6380-mt:~/test1$ls.. /test2/Ren[email protected]-hp-compaq-pro-6380-mt:~/test1$ls-L: /test2/ Total4-rw-rw-r--2RENJG RENJG theSeptember1 -: Aren #文件占用磁盘大小 [email protected]-hp-compaq-pro-6380-mt:~/test1$ls-Ltotal8-rw-rw-r--1RENJG RENJG theSeptember1 -: AJin-rw-rw-r--2RENJG RENJG theSeptember1 -: ARen[email protected]-hp-compaq-pro-6380-mt:~/test1$LN-S Jin. /test2/Jin #软链接 [email protected]-hp-compaq-pro-6380-mt:~/test1$ [email protected]-hp-compaq-pro-6380-mt:~/test1$ls-L: /test2/ Total4lrwxrwxrwx1RENJG RENJG3September1 -: +Jin--Jin #并不占用磁盘大小-rw-rw-r--2RENJG RENJG theSeptember1 -: ARen[email protected]-hp-compaq-pro-6380-mt:~/test1$ls-Ltotal8-rw-rw-r--1RENJG RENJG theSeptember1 -: AJin-rw-rw-r--2RENJG RENJG theSeptember1 -: ARen[email protected]-hp-compaq-pro-6380-mt:~/test1$
Linux File System Command ln