Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Symbolic link
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===NTFS symbolic link=== {{Main|NTFS symbolic link}} [[NTFS]] 3.1 introduced support for symbolic links for any type of file. It was included with [[Windows XP]], but was only enabled by default for kernel-mode apps. [[Windows Vista]] and later versions of Windows enabled support for symbolic links to user-mode applications. The <code>mklink</code> internal command of [[Windows command prompt|Windows Command Prompt]] can create symbolic links. Third-party drivers are required to enable support for NTFS symbolic links in Windows XP.<ref>{{cite web |url=https://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html#symboliclinksforwindowsxp |title=Link Shell Extension website |website=Link Shell Extension website}}</ref> Unlike [[NTFS junction point|junction point]]s, a symbolic link can also point to a file or remote [[Server Message Block]] (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. Symbolic links are designed to aid in migration and application compatibility with [[POSIX]] operating systems. Microsoft aimed for Windows Vista's symbolic links to "function just like UNIX links".<ref>[https://msdn.microsoft.com/en-us/library/aa365680.aspx Symbolic Links], MSDN Library, Win32 and COM Development, 2008-01-18</ref> However, the implementation differs from Unix symbolic links in several ways. For example, Windows Vista users must manually indicate when creating a symbolic link whether it is a file or a directory.<ref>{{Cite web|title=CreateSymbolicLinkA function (winbase.h)|url=https://msdn.microsoft.com/en-us/library/aa363866.aspx |website=[[MSDN]]|date=June 2023 }}</ref> Windows 7 and Vista support a maximum of 31 [[reparse point]]s (and therefore symbolic links) for a given path (i.e. any given path can have at most 31 indirections before Windows gives up).<ref>[https://msdn.microsoft.com/en-us/library/aa365460(VS.85).aspx Symbolic Link Programming Considerations], MSDN</ref> Only users with the new ''Create Symbolic Link'' privilege, which only administrators have by default, can create symbolic links.<ref>Mark Russinovich: [https://www.microsoft.com/technet/technetmag/issues/2007/02/VistaKernel/default.aspx Inside the Windows Vista Kernel: Part 1] β File-based symbolic links, Microsoft Technet, February 2007.</ref> If this is not the desired behavior, it must be changed in the Local Security Policy management console. Additionally, NTFS symbolic links to files are distinct from NTFS symbolic links to directories and therefore cannot be used interchangeably, unlike on POSIX where the same symbolic link can refer to either files or directories. In Windows Vista and later, when the working directory path ends with a symbolic link, the current parent path reference, {{code|..}}, will refer to the parent directory of the symbolic link rather than that of its target. This behavior is also found at the shell level in at least some POSIX systems, including [[Linux]], but never in accessing files and directories through operating system calls. For instance, bash builtin commands {{code|pwd}} and {{code|cd}} operate on the current logical directory. {{code|pwd}} is often used in scripts to determine the actual current working directory. When any path is used with a system call, any use of {{code|..}} will use the actual filesystem parent of the directory containing the {{code|..}} pseudo-directory entry. So, {{code|cd ..; cat something}} and {{code|cat ../something}} may return completely different results. ==== Examples ==== The following examples both create a symbolic link called "Downloads" at "E:\" that points to the Downloads folder in the current user's profile. * The first example works in [[Windows command prompt|Windows Command Prompt]] only because <code>mklink</code> is an internal command. : <syntaxhighlight lang="batch" inline=""> mklink /D E:\Downloads %UserProfile%\Downloads </syntaxhighlight> * The second example works in [[PowerShell]] only because New-Item is an internal cmdlet. : <syntaxhighlight lang="ps1" inline=""> New-Item -Path 'E:\Downloads' -ItemType 'SymbolicLink' -Value "$Env:UserProfile\Downloads" </syntaxhighlight>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Symbolic link
(section)
Add topic