Information AboutSymlink |
| CATEGORIES ABOUT SYMBOLIC LINK | |
| computer file systems | |
|
Unlike a Hard Link , a symbolic link does not point directly to data, but merely contains a symbolic path which an operating system uses to identify a hard link (or another symbolic link). Thus, when a user removes a symbolic link, the file to which it pointed remains unaffected. (In contrast, the removal of a hard link will result in the removal of the file if that file has no other hard links.) Systems can use symbolic links to refer to files even on other mounted File System s. The term ''orphan'' refers to a symbolic link whose target does not exist. Symbolic links operate transparently, which means that their implementation remains invisible to applications. When a program opens, reads, or writes a symbolic link, the operating system will automatically redirect the relevant action to the target of the symlink. However, functions do exist to detect symbolic links so that applications may find and manipulate them. Users should pay careful attention to the maintenance of symbolic links. Unlike hard links, if the target of a symbolic link is removed, the data vanishes and all links to it become orphans. Conversely, removing a symbolic link has no effect on its target. STORAGE OF SYMBOLIC LINKS Early implementations of symbolic links would store the symbolic link information in standard disk blocks, much like regular files. The file contained the textual reference to the link’s target, and an indicator denoting it as a symbolic link. This arrangement proved somewhat slow, and could waste Disk-space on small systems. An innovation called fast symlinks allowed storage of the link-text within the standard Data Structure s used for storing file information on disk ( Inode s). This space generally serves to store the chain of disk Block s composing a file (60 bytes on the Unix File System ). This simply means that users can reference shorter symbolic links quickly. Systems with fast symlinks often fall back to using the older method if the path and filename stored in symlink exceeds the available space in the inode, or for disk compatibility with other or older versions of the operating system. The original style has become Retroactively Termed '''slow symlinks'''. Although storing the link value inside the inode saves a disk block and a disk read, the operating system still needs to parse the pathname information in the link, which always requires reading an additional inode and generally requires reading other — potentially many — directories, processing both the list of files and the inodes of each of them until it finds a match with the link pathname components. Only when a link points to a file inside the same directory do fast symlinks provide significant gains in performance. The POSIX standard does not require very many struct stat values to have meaning for symlinks. This allows implementations to avoid symlink inodes entirely by storing the symlink data in directories. However, the vast majority of POSIX implementations (including all implementations Currently in widespread use) do use symlink inodes.The File-system Permission s on the symbolic (or soft) link have no relevance: the permissions set on the file to which the symlink points control the access rights. The size of a slow symlink exactly equals the number of characters in the path it points to. The size of a fast symlink is 0. SIMILAR CONCEPTS In addition to the symbolic link described above, Mac OS can employ Aliases , which have the added feature of working even if the target file moves to another location on a different disk. Microsoft , which are supported by most operating systems. Symbolic links also resemble Shadows in the graphical Workplace Shell of the OS/2 operating system. Variant symlinks A variant symlink is a symbolic link that has a variable name embedded in it. This can allow some clever tricks to be performed that are not possible with a standard symlink. Variables embedded in the symlinks can include user and or environment specific information among other things. Operating Systems that make use of variant symlinks include Domain/OS and DragonFly BSD . TRIVIA The operating system Plan 9 , designed as a research successor to Unix, does not support symbolic links. SEE ALSO
REFERENCES EXTERNAL LINKS |
|
|