NTFS symbolic link
Encyclopedia
An NTFS symbolic link is a filesystem object in the NTFS filesystem
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....

 that points to another filesystem object. The object being pointed to is called the target. Symbolic link
Symbolic link
In computing, a symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links were already present by 1978 in mini-computer operating systems from DEC and Data...

s should be transparent to users; the links appear as normal files or directories, and can be acted upon by the user or application in exactly the same manner. Symbolic links are designed to aid in migration and application compatibility with POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...

 operating systems, and were introduced with the modifications made to the NTFS file system with Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

.

Unlike an NTFS junction point
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...

 (available since Windows 2000), a symbolic link can also point to a file or remote SMB
Server Message Block
In computer networking, Server Message Block , also known as Common Internet File System operates as an application-layer network protocol mainly used to provide shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network. It also provides an...

 network path. While NTFS junction points support only absolute paths on local drives, the NTFS symbolic links allow linking using relative paths. 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.

An NTFS symbolic link is not the same as a Windows shortcut file, which is a regular file. The latter may be created on any filesystem (such as the earlier FAT32), may contain metadata (such as an icon to display when the shortcut is viewed in Windows Explorer
Windows Explorer
This article is about the Windows file system browser. For the similarly named web browser, see Internet ExplorerWindows Explorer is a file manager application that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user interface...

), and is not transparent to applications.

Restrictions

The default security settings in Windows Vista/Windows 7 disallow non-elevated administrators and all non-administrators from creating symbolic links. This behavior can be changed in the Local Security Policy management console (under: Security Settings\Local Policies\User Rights Assignment\Create symbolic links). It can be worked around by starting cmd.exe
Cmd.exe
Command Prompt is the Microsoft-supplied command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems...

 with Run as administrator option or the runas
Runas
In computing, runas is a command in the Microsoft Windows line of operating systems that allows a user to run specific tools and programs under a different username to the one that was used to logon to a computer interactively...

command.

Syntax

The mklink command is used to create a symbolic link. It is natively available in Windows Vista/2008+.
It has the following command line syntax:


mklink [/H]  link target

  • /D – Creates a directory symbolic link. Default is a file symbolic link.
  • /H – Creates a 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...

     instead of a symbolic link
    Symbolic link
    In computing, a symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links were already present by 1978 in mini-computer operating systems from DEC and Data...

    .
  • /J – Creates a Directory Junction
    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...

    .
  • link – Specifies the new symbolic link name.
  • target – Specifies the path (relative or absolute) that the new link refers to.


Just like ordinary files and folders, del
Del (command)
In computing, del is a command in various DOS, OS/2 and Microsoft Windows command line interpreters such as COMMAND.COM, cmd.exe, 4DOS/4NT and Windows PowerShell. It is used to delete one or more files or directories from a filesystem. It is analogous to the Unix rm command...

and rmdir
Rmdir
rmdir is a command which will remove an empty directory on a Unix, DOS, OS/2 or Microsoft Windows operating system. In Unix, Linux, and MacOS, it is case sensitive, whereas DOS, OS/2 and Windows , you can type the characters in any combination of upper case and lower case letters, and rd/rmdir...

can be used to delete symbolic links to files and directories.

To delete a symbolic link to a file or directory, the following command line syntax can be used (in each case, "linkname" specifies the name of the symbolic link to be deleted):
  • For links to files: del linkname
  • For links to directories: rmdir linkname

Other features

Symbolic links can point to non existent targets because the operating system does not check to see if the target exists.

External links

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