FACTOID # 94: In pure number terms, more crimes are committed in America than in any other nation. The same goes for burglaries, car thefts, rapes and assaults.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Hard link

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. ... It has been suggested that Crash counting be merged into this article or section. ...


On Unix, hard links can be created with the link() system call, or the command ln. Filiation of Unix and Unix-like systems Unix (officially trademarked as UNIX®) is a computer operating system originally developed in the 1960s and 1970s by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. ... In computing, a system call is the mechanism used by an application program to request service from the operating system. ...


In Windows, hard links can be created only on NTFS volumes, either with the fsutil hardlink utility [1] (limited to Windows XP, Windows Server 2003, and Windows Vista), with the mklink command [2] (in Windows Vista and in the forthcoming Windows Server 2008), or with commercially available tools, such as the FAR Manager. 1. ... NTFS (New Technology File System) is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, and Windows Vista. ... Windows XP is a line of operating systems developed by Microsoft for use on general-purpose computer systems, including home and business desktops, notebook computers, and media centers. ... Windows Server 2003 is a server operating system produced by Microsoft. ... Windows Vista is a line of graphical operating systems used on personal computers, including home and business desktops, notebook computers, Tablet PCs, and media centers. ... Windows Vista is a line of graphical operating systems used on personal computers, including home and business desktops, notebook computers, Tablet PCs, and media centers. ... Windows Server 2008 is the name of the next server operating system from Microsoft. ... File and ARchive Manager is an orthodox file manager for Microsoft Windows and a clone of Norton Commander. ...


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. ...

Contents

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. 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. ...


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. 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. Wikipedia does not have an article with this exact name. ...


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.


Drawbacks 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

A hardlink establishes a reference link between the physical world and a . ... 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. ... 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. ... An NTFS junction point (JP) is a feature of the NTFS file system version 3. ... 4NT is a command line interpreter by JP Software, designed as a substitute for the default command interpreter cmd. ... NTFS (New Technology File System) is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, and Windows Vista. ...

External links

  • On line manual page of ln
  • Creating hard links in Windows XP Professional using fsutil
  • CreateHardLink WinAPI function - creating hard links programmatically
  • Utility to create hard links, junctions and symbolic links in Windows NT/2000/XP/Vista
  • Xplorer2 File manager that includes (among many others) a link-creation function in NT/2000/XP/Vista
  • NTFS Links, an add-on for Total Commander, allowing to create hard links and junctions on NTFS volumes.

  Results from FactBites:
 
Hard Link (872 words)
This is in fact a hard link, but most people usually associate "hard linking" to be the creation of additional directory entries for an existing object.
Therefore, the creation of a subdirectory creates a new hard link to the parent, and two new hard links to the new object: one from the parent, and one from its own dot entry.
Depending on the kernel, the decision to allow a directory hard link may be deferred to the filesystem module itself.
Hard link - Wikipedia, the free encyclopedia (524 words)
In computing, a hard link is a reference, or pointer, to the physical data on a volume.
Hard links can only refer to data that exists on the same file system.
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.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.