2010年3月12日星期五

Comparison of Hard Link and Symbolic Link

Comparison of Hard Link and Symbolic Link

ItemHard LinkSymbolic Link
Name resolution Faster. A hard link contains a direct reference to the object.Slower. A symbolic link contains a path name to the object, which must be resolved to find the object.
Object existenceRequired. An object must exist in order to create a hard link to it. Optional. A symbolic link can be created when the object it refers to does not exist.
Object deletion Restricted. All hard links to an object must be unlinked (removed) to delete the object.Unrestricted. An object can be deleted even if there are symbolic links referring to it.
Dynamic objects (attributes change)Slower. Many of the attributes of an object are stored in each hard link. Changes to a dynamic object, therefore, are slower as the number of hard links to the object increases. Faster. Changes to a dynamic object are not affected by symbolic links.
Static objects (attributes do not change) Faster. For a static object, name resolution is the primary performance concern. Name resolution is faster when hard links are used. Slower. Name resolution is slower when symbolic links are used.
ScopeRestricted. Hard links cannot cross file systems. Unrestricted. Symbolic links can cross file systems.

没有评论: