NTFS reparse point
Encyclopedia
An NTFS reparse point is a type of NTFS
NTFS
NTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, and Windows 7....

 file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 object. It is available with the NTFS v3.0 found in Windows 2000
Windows 2000
Windows 2000 is a line of operating systems produced by Microsoft for use on personal computers, business desktops, laptops, and servers. Windows 2000 was released to manufacturing on 15 December 1999 and launched to retail on 17 February 2000. It is the successor to Windows NT 4.0, and is the...

 or later versions. Reparse points provide a way to extend the NTFS filesystem by adding extra information to the directory
Directory (file systems)
In computing, a folder, directory, catalog, or drawer, is a virtual container originally derived from an earlier Object-oriented programming concept by the same name within a digital file system, in which groups of computer files and other folders can be kept and organized.A typical file system may...

 entry, so a file system filter can interpret how the operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 will treat the data. This allows the creation of junction points
NTFS junction point
An NTFS junction point is a feature of the NTFS file system that provides the ability to create a symbolic link to a directory which then functions as an alias of that directory...

, NTFS symbolic link
NTFS symbolic link
An NTFS symbolic link is a filesystem object in the NTFS filesystem that points to another filesystem object. The object being pointed to is called the target. Symbolic links should be transparent to users; the links appear as normal files or directories, and can be acted upon by the user or...

s and volume mount points, and is a key feature to Windows 2000's Hierarchical Storage System
Hierarchical storage management
Hierarchical storage management is a data storage technique which automatically moves data between high-cost and low-cost storage media. HSM systems exist because high-speed storage devices, such as hard disk drive arrays, are more expensive than slower devices, such as optical discs and magnetic...

. They also can act as hard link
Hard link
In computing, a hard link is a directory entry that associates a name with a file on a file system. . The term is used in file systems which allow multiple hard links to be created for the same file. This has the effect of creating multiple names for the same file, causing an aliasing effect: e.g...

s, but aren't limited to point to files on the same volume: they can point to directories on any local volume.

Basic, simple breakdown

In general:
  • hard link - link to a file (MFT entry) The data are still accessible as long as at least one link that points to it still exists.
  • soft link - link to its name (file path).

'Soft' links

Windows Vista supports a new symbolic link capability that replaces junction points in Windows 2000 and Windows XP. They are designed to aid in migration and application compatibility with UNIX operating systems. Unlike a junction point, a symbolic link can also point to a file or remote SMB network path. Additionally, the NTFS symbolic link implementation provides full support for cross-filesystem links. However, the functionality enabling cross-host symbolic links requires that the remote system also support them, which effectively limits their support to Windows Vista and later Windows operating systems.
  • NTFS symbolic link (SYMLINK) - local or remote, relative or absolute SMB file or path. Enabling cross-host symbolic links requires that the remote system also support them, which effectively limits their support to Windows Vista and later Windows operating systems. Used in WS8 for '\Users\All Users\' '->' '\ProgramData' only (in basic installation). Symbolic links can point to non existent targets because the operating system does not check to see if the target exists. With mklink or mklink /D. Relative symbolic links are restricted to a single volume.

  • Junction point/directory junction - since Windows 2000 - absolute directory (may be \) on a local volume. Used in default Windows Server 2008 configuration for Users folder redirs. With mklink /J. Deleting a junction point using Windows Explorer will delete the targeted files immediately if using shift-delete (Windows 2000/XP/2003). the command del myjunction should not be used — this will just delete all the files in the targeted directory. Deleting a junction point using Explorer is safe since Vista.

Hard links

  • NTFS HARD link - since Windows NT4 - files on the same drive. The Windows API from Windows 2000 onwards includes a CreateHardLink call to create hard links and DeleteFile to remove them. All versions of Windows NT can use GetFileInformationByHandle to determine the number of hard links associated with a file. Hard links require an NTFS partition. Unix-like emulation or compatibility software running on Windows, such as Cygwin and Subsystem for UNIX-based Applications, allow the use of POSIX interfaces under Windows. Most modern operating systems don't allow hard links on directories to prevent endless recursion. In addition, hard links on directories would lead to inconsistency on parent directory entries. Symbolic links and NTFS junction points are generally used instead for this purpose. Hard links can only be created to files on the same file system. If a link to a file on a different file system is needed, it may be created with a symbolic link. Hard links are created with mklink /H

Hard link uses the same MFT entry as the original file. Adding a hard link creates a new name attribute and increases the hard link count (for a newly created file this count equals to one). Deleting a hard link removes the appropriate name and decreases the hard link count. When the count goes to zero, the system deletes the file, freeing up its allocated disk space and releasing its MFT record. All the name attributes are independent, so deleting, moving, or renaming the file don't affect other hard links.

What to use in the Windows world?

  • mklink or mklink /D for universal, absolute/relative local/network 2000/XP/Vista-compatible symbolic links (symlinks, soft links). If you specify a current working directory–relative link, it is created as an absolute link, due to the way the current working directory is processed based on the user and the thread. Microsoft aimed for Vista's symbolic links to "function just like UNIX links". In Windows 7 and Windows Vista, when the working directory path ends with a symbolic link, the current parent path reference, .., will refer to the parent directory of the symbolic link rather than that of its target.

  • mklink /J, /H avoid if no good reason.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK