Hard Links: Link
Popular understanding: multiple names from a file
Features: ln (link) the original and destination files are not in a directory
Delete a file and another file can also use the
multiple hard links occupy only one copy of the data space
no cross-section, cross-device
hard links cannot be created for a catalog.
Common Hard-link methods:
ln Raw File Link file
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/85/2B/wKiom1ebVuzQ8RkNAAA5xDvUZ-4814.png "title=" 3.png " alt= "Wkiom1ebvuzq8rknaaa5xdvuz-4814.png"/>
Number of file connections: equivalent to the number of names of a file, no increase in the number of hard-link connections increased by 1
the number of links to the directory: each directory . total number of files, including sub-file
RM Deleting a hard-link file is equivalent to deleting the file name.
Soft Links:
Popular saying: Quite a shortcut
Attribute: Soft link size equals link filename character number
Create multiple files without changing the number of connections
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/85/2B/wKiom1ebWMfQuLJNAAAujARhZg0078.png "title=" Qq20160729212304.png "alt=" Wkiom1ebwmfquljnaaaujarhzg0078.png "/>
Can cross device, create link is best write absolute path
Can be soft-linked to a directory
How to create a soft connection
Ln–s original file relative path or absolute path (must be relative to soft link path) Soft Link File
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/85/2B/wKioL1ebWZyQ2y1iAAAoRhdhLMM964.png "title=" Qq20160729212624.png "alt=" Wkiol1ebwzyq2y1iaaaorhdhlmm964.png "/>
The following command causes the error:
The/testdir/f1 file is hard-linked to/testdir/aa/f2, and relative paths are used in the original file, where the relative path is relative to AA, not the previous layer of TESTDIR/,AA, testdir,f2 the actual link testdir/ Testdir/f1
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/85/2B/wKiom1ebWq_A4DAMAACOGanE6oE469.jpg "title=" 1.jpg " alt= "Wkiom1ebwq_a4damaacogane6oe469.jpg"/>
Hard links and soft links used, and differences