|
In computing, a hard link is a reference, or pointer, to physical data on a storage volume. On most file systems, all named files are hard links. The name associated with the file is simply a label that refers the operating system to the actual data. As such, more than one name can be associated with the same data. Though called by different names, any changes made will affect the actual data, regardless of how the file is called at a later time. Hard links can only refer to data that exists on the same file system. RAM (Random Access Memory) Look up computing in Wiktionary, the free dictionary. ...
For library and office filing systems, see Library classification. ...
On Unix-like systems, hard links can be created with the link() system call, or the ln utility. Diagram of the relationships between several Unix-like systems A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification. ...
In computing, a system call is the mechanism used by an application program to request service from the operating system. ...
The ln command is used on Unix-like systems to create links between files. ...
On Microsoft Windows, hard links can be created only on NTFS volumes, either with fsutil hardlink or mklink. âWindowsâ redirects here. ...
NTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, and Windows Vista. ...
The process of unlinking disassociates a name from the data on the volume. The data is still accessible as long as at least one link that points to it still exists. When the last link is removed, the space is considered free. A process ambiguously called undeleting allows the recreation of links to data that is no longer associated with a name. However, this process is not available on all systems and is often not reliable. This article or section does not cite its references or sources. ...
Link counter Most file systems that support hard links use reference counting. An integer value is stored with each physical data section. This integer represents the total number of links that have been created to point to the data. When a new link is created, this value is increased by one. When a link is removed, the value is decreased by one. The maintenance of this value assists users in preventing data loss. It is also the simplest way for the file system to track the use of a given area of storage, as zero values indicate free space and nonzero values indicate used space. See Filing system for this term as it is used in libraries and offices In computing, a file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. ...
Links is the plural form of link. ...
In computer science, reference counting is a technique of storing the number of references, pointers, or handles to a resource such as an object or block of memory. ...
The integers are commonly denoted by the above symbol. ...
For other uses, see Data (disambiguation). ...
On Unix, the reference count for a file or directory is returned by the stat() or fstat() system calls in the st_nlink field of struct stat. In contrast, programming language implementations that use reference counting rarely expose the reference count to the program being executed, since this information is just an implementation detail. Filiation of Unix and Unix-like systems Unix (officially trademarked as UNIX®, sometimes also written as or ® with small caps) is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. ...
stat() is a Unix system call that returns useful data about an i-node. ...
A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ...
Example An illustration of the concept of hard linking. In the figure to the right, there are two hard links named "LINK A.TXT" and "LINK B.TXT". They have both been linked - that is, made to point - to the same physical data. If the filename "LINK A.TXT" is opened in an editor, modified and saved, then those changes will be visible even if the filename "LINK B.TXT" is opened for viewing since both filenames point to the same data. The same is true if the file were opened as "LINK B.TXT" - or any other name associated with the data. Additional links can also be created to the physical data. The user need only specify the name of an existing link; the operating system will resolve the location of the actual data section. If one of the links is removed (ie, with the UNIX 'rm' command), then the data is still accessible under any other links that remain. If all of the links are removed and no process has the file open, then the space occupied by the data will be considered free, allowing it to be reused in the future for other files. This semantic allows for deleting open files without affecting the process that uses them - an action which is impossible on filesystems with a 1-to-1 relationship between directory entries and data.
Limitations of hard links There are some issues with hard links that can sometimes make them unsuitable. First of all, because the link is identical to the thing it points to, it becomes difficult to give a command such as "list all the contents of this directory recursively but ignore any links". Most modern operating systems don't allow hard links on directories to prevent endless recursion. Another drawback of hard links is that they have to be located within the same file system, and most large systems today consist of multiple file systems.
See also In computing, a symbolic link (often shortened to symlink and also known as a soft link) consists of a special type of file that serves as a reference to another file. ...
An NTFS junction point (JP) is a feature of the NTFS file system version 3. ...
In System 7 and later, an alias is a small file that represents another object in the file system. ...
In the graphical Workplace Shell of the OS/2 operating system, a shadow is an object that represents another object. ...
The ln command is used on Unix-like systems to create links between files. ...
External links |