[go: nahoru, domu]

Jump to content

Talk:Symbolic link

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Permissions Information

[edit]

The question of the effects of read, write and execute permissions as seen by the user of the materials accessed via the symlink, and the user of the same materials accessed directly needs to be addressed. Questions such as "If I write protect the symlink, does that write protect the content at the target of the symlink, even if the target is actually writable if accessed directly?" will be on some visitor's minds. Such as mine. :) Fyngyrz (talk) 16:30, 22 December 2015 (UTC)[reply]

History Request

[edit]

As this is Wikipedia article and not a how to, I came here looking for the history of symbolic links. While there is some talk about their use in minis (thank you), I would value more detail on the history, development and theory. But please, do not degenerate into which OS intended it first contest. Thanks. — Preceding unsigned comment added by 2001:4898:80E0:EE43:0:0:0:2 (talk) 16:06, 14 August 2014 (UTC)[reply]

The ITS 1.5 Reference Manual from 1969 says there were symbolic links. The 1.4 manual from 1968 does not. Lars Brinkhoff (talk) 13:40, 24 May 2018 (UTC)[reply]
The Multics paper "A General-Purpose File System For Secondary Storage" from 1965 describes symbolic links. Note that Multics wasn't operational until 1967. Lars Brinkhoff (talk) 13:45, 24 May 2018 (UTC)[reply]

Misleading Vista/Win7 Comments

[edit]

The article currently states:

Vista has a limit of 31 symbolic links in a single path.

This implies that a directory (C:\Temp) can only contain 31 symbolic links (e.g. C:\Temp\Dir1, C:\Temp\Dir2, etc.). According to Microsoft's documentation, "[t]here is a maximum of 31 reparse points (and therefore symbolic links) allowed in a particular path." A "reparse point" is essentially a symbolic link or directory junction. As such, Windows 7 and Vista are limited to a chain of 31 symbolic links or junctions.

I believe the above quotation should be replaced with the following line:

Windows 7 and Vista support a maximum of 31 reparse points (and therefore symbolic links) for a given path.

--216.148.0.72 (talk) 01:05, 30 May 2012 (UTC)[reply]

No Eleete Language

[edit]

please use simple language to describe the problem. there is no need to use many foreign words. wikipedia aims to be understood by everyone not just a 'choosen few'. it would be perfect if you would use no technical english even for tech articles.

--212.202.37.226 17:10, 5 Jun 2005 (UTC)jan girke

[edit]

On another note, It seems that vista does not have true support for symlinks: http://slashdot.org/articles/06/11/19/018256.shtml Perhaps this should be corrected in the article.

You're right: Vista does not have 'true support for symlinks'. Vista can't even connect to a native Unix file system at all!
What Vista has is support for Symbolic Links, implemented as a component of NTFS. Sadly, Unix systems which connect to NTFS file systems don't have true support for NTFS Symbolic Links, because they don't understand the symbols.
Yes Symbolic Links are a component of NTFS. Yes, you have to load all of the current version of NTFS to get this feature. Yes, the NTFS Symbolic Link components only come with Vista. No, you don't need a new version of NTFS: NTFS allows you to add features.
And finally, Yes these symbolic links allow you to have different file and user permissions for each symbolic link. Nifty feature, yes?
Note: Windows 2000 had Windows SFU, which had NFS and symlinks 218.214.18.240 (talk) 06:02, 24 November 2007 (UTC)[reply]

Clean-up

[edit]

The following sections have been removed:

Symbolic links can be remapped to allow locations of files to be addressed in a consistent manner, even though the physical location of the file may vary.

I don't think this is true. Symbolic links are immutable (they cannot be changed), however they can be removed and then a new symbolic link can be created in their place.

Using the 'ls -l' command, which is standard on these systems, a symbolically linked file might look something like this:
lrwxrwxrwx    1 jbailey  users         4 2003-02-07 16:49 link -> file
The 'l' in the first column is a hint that this file is a symbolic link. The information at the furthest right indicates that this file is called 'link', and that when you access it, you will see the contents of 'file'.

This doesn't belong in this article.

Symbolic links to directories can be dangerous for unaware programs working with directory trees. At best they can cause endless looping as well as pathname buffer overflows leading to crashes or dangerous malfunctions. At worst, deleting a directory tree will lead to the content of the symlinked directories being deleted as well. Unix tries to protect against this behavior to some extent by disallowing to destroy a directory symlink using the remove-directory (rmdir) system call, hence symlink-unaware programs will generally fail after trying to delete the first such link.

This may be a valid point, but I question its pertinence. At the very least, it should be reworded. Unix-like systems take no such precaution: 'rmdir' operates on the directory entry and ignores its contents. Directory trees cannot usually be deleted in a single action, either. A program must recurse through the tree, deleting all of the files in a directory, then removing the directory itself.—Kbolino 01:55, 7 January 2006 (UTC)[reply]

[edit]

I just learnt that Windows 2000 (and above) does support symbolic links but is not well-documented. I was researching a problem with missing files and read this article - http://shell-shocked.org/article.php?id=284 - which is fairly descriptive about how Windows works with Symbolic links. gv —The preceding unsigned comment was added by Guhanv (talkcontribs) 12:34, 26 April 2007 (UTC).[reply]

No, Windows 2000 does not support symbolic links (except as shortcuts and mount points). NTFS 3, which is the default file system of Windows 2000, provides generic support for symbolic links, but Windows 2000 has no way to create or follow them. As the reference points out, you can use shortcuts or mount points "like" symbolic links. Or you can add support for symbolic links to Windows 2000, because Windows 2000 uses an extensible file system and an extensible command shell. But the same was also true of DOS 3.1 (david) 218.214.18.240 11:10, 10 June 2007 (UTC)[reply]
Actually, Windows 2000 does support symlink-type functionality, but for directories only, not files; see NTFS Junction point. Windows Vista implements proper symbolic links for all types of file, including across network shares; see NTFS symbolic link. All this is now in the article. And no, the same was not "true for DOS 3.1" (assuming you mean WIndows 3.1, which used DOS 6 or thereabouts): this functionality is all implemented using NTFS reparse points, of which FAT had no equivalent; WIndows 3.1 did not support NTFS. -- simxp (talk) 18:24, 3 May 2008 (UTC)[reply]
Right, Windows 2000 does support 'symlink-type' functionality, rather than symlinks. Windows 2000 also, like DOS 3.1, has an extensible file system that allows you to add features like symlinks, which has been done in Vista. DOS 2.2 had a replaceable file system, but DOS 3.1 added significantly to the operating system capability, making it possible to implement symlinks without replacing the whole file system.218.214.18.240 (talk) 04:40, 5 September 2010 (UTC)[reply]
By the way, Windows supports variable shortcuts using environment variables. I haven't seen anybody using this with Symbolic Links, but that also looks possible, linking through a GUID and the registry.218.214.18.240 (talk) 04:46, 5 September 2010 (UTC)[reply]

Similar Concepts

[edit]

The link to "binding" is broken

[edit]

Windows does NOT support symlinks. Symlinks is defined below the OS layer and is part of the file system and is NOT a type of file. Please stop comparing shortcuts to Symlinks. Lets also stop trying to predict what will be in future shaky releases of Windows as their track record is not good.

I will correct the main article, as less time should be devoted to OSes that do NOT suppport symlinks. --Kibbled bits 21:16, 18 June 2007 (UTC)[reply]

So can we expect to see a new article from you, titled "symlinks"?
This article is titled Symbolic Links, not symlinks. Windows Vista does support Symbolic Links, as well as Hard Links. NTFS is an extensible file system, and supports Symbolic Links when the necessary components are in place, as they are in Windows Vista.
Furthermore, Windows Explorer has always supported Symbolic Links, which are shortcuts, which are not symlinks. Windows Explorer is a command shell, so only command shell extensions (or environments like uwin) are able to use the command shell Symbolic Links. Windows Vista introduces a Symbolic Link implemented as part of the file system, so that any file system client is able to use the Symbolic Link.
Also, the new text is poor: even if it was correct, the focus is on what Windows cannot do, rather than on Symbolic Links 150.101.166.15 06:31, 4 July 2007 (UTC)[reply]
So just to be absolutely clear, what do you mean by "any file system client is able to use..."? What I want to know is, if I use this vista symbolic link, will every single program, no matter how old or poorly written or what circumstances it is running under, see that symbolic link as whatever it's linking to, or not? —Preceding unsigned comment added by 76.10.140.61 (talk) 19:46, 11 April 2008 (UTC)[reply]
With Vista's symbolic links, yes. With NTFS Junction points, yes. With NTFS Hard links, yes. With Windows Shortcuts, no. Clear? -- simxp (talk) 10:22, 3 May 2008 (UTC)[reply]

Can someone knowledgeable create a comparison of Windows shortcuts to symbolic links? Functionally for me at least there is no difference since they just get me to a long filename from a shorter filename on the desktop (and also start menu in windows) without typing forever or clicking through nested folders. 129.31.71.161 09:37, 2 August 2007 (UTC)[reply]

Sigh. Junctions are *one implementation* of soft-links, that only work for directories. I believe they were actually (at least partially) a side effect of code for the Object Manager component (which gives access to every device, global mutex, file, registry entry, etc...) implemented for Terminal Services (remote login). Shortcuts are just files that Explorer and the ShellExecute() function interpret. Vista added *real* soft and hard links to NTFS (not the object manager), added mklink, and taught all their file programs about them (including Explorer). —Preceding unsigned comment added by 124.197.41.54 (talk) 02:33, 8 November 2007 (UTC)[reply]
Note, a form of junction (JOIN) existed even in DOS... Hard links were already in NTFS, for POSIX; Vista added management capability...Shortcuts are slow soft links, but there is no OS or FS support for programs (environments like uwin have to build their own support)...Functionally Windows shortcuts are the same as symbolic links to a user, but not to a user program...the distinction is important to anyone who uses a program (even Word or Excel) in Windows...Windows SFU supported symbolic links on NFS file systems...218.214.18.240 (talk) 05:55, 24 November 2007 (UTC)[reply]
[edit]

The statement that "Cygwin ... creates Windows shortcuts (.lnk files)" seems to be incorrect or outdated. —Preceding unsigned comment added by 145.94.50.9 (talk) 15:46, 14 January 2011 (UTC)[reply]

Doctors?

[edit]

"The misuse of soft links can be a cause extreme irritation in many subjects. Doctors report a significant increase in blood pressure, body temperature, and elevated vocal ranges. Persons with a history of heart conditions should refrain from the use of softlinks without first consulting with their physician."

What does this have to do with softlinks? —Preceding unsigned comment added by 68.197.165.133 (talk) 06:55, 15 September 2007 (UTC)[reply]

White Knight Through the Looking Glass

[edit]

So can anyone decisively explain the differences between filenames, shortcuts, hard and symbolic links, and the data they represent? —Nahum Reduta 05:10, 2 December 2007 (UTC)[reply]

What's it good for?

[edit]

Why was the concept of symbolic links invented when there is already the concept of hard links? --Abdull (talk) 18:49, 7 August 2008 (UTC)[reply]

Hard link#Limitations of hard links -- simxp (talk) 11:36, 18 August 2008 (UTC)[reply]

relative path

[edit]

Note that Windows Shortcuts may contain a relative path, or an incomplete path. I don't want to see a full explanation of Windows Shortcuts here, just to avoid subtle technical errors.218.214.18.240 (talk) 05:25, 5 September 2010 (UTC)[reply]

[edit]

In the intro it is claimed that symbolic links were already present in 1978 in mini computer OSs from DEC. I knew one of them (RT-11) quite well and it did not have symbolic links on the file system level. The latest versions of RT-11 knew something like command aliases, but no symbolic links.

I never used the other mini computer OS RSTS (also created by DEC), but according to the RSTS page it was similar to RT-11.

I think the claim should be modified.

Treutwein (talk) 09:35, 24 January 2011 (UTC)[reply]

Windows shortcuts maintain their connection even when the target is moved

[edit]

Windows shortcuts maintain their connection even when the target is moved, unlike symbolic links. Windows XP will search for a broken link's target before offering to delete it. This isn't "shortcuts maintaining their connection", this is Windows attempting to repair them on an ad-hoc basis. Do newer versions of Windows do something more advanced? From the first sentence it sounds like Windows is keeping track of what shortcuts refer to a file, and then update these shortcuts when a file is moved. This is clearly not XP's behavior. Should be reworded. — Preceding unsigned comment added by 194.237.142.20 (talk) 04:47, 30 June 2011 (UTC)[reply]

Okay, how does it look now? Fleet Command (talk) 16:00, 30 June 2011 (UTC)[reply]
Distributed Link Tracking is maintained by Link Tracking Database in Active Directory on a Windows Domain Server. The Tracking Database can contain entries for non-domain computers, but you need to have the Domain Server for the Active Directory to contain the Link Database. Shortcuts are OLE links (http://technet.microsoft.com/en-us/library/cc768201.aspx), so the DLT service and client track links within OLE documents (Word etc) as well as shell shortcuts.
The Win98 workstation that I have attempts to locate targets for broken shortcuts when you click on them. So does the Win 2K workstation I am using. Both Win2K and Win98 do a file-system scan if they can't locate the target in the absolute or relative path.
You may see in MS documentation statements like "Windows 7 attempts to update shortcuts" or you may see it listed in a list of Windows 7 features. That is a characteristic of MS documentation: MS documentation of current features does not document past features. You must not assume that such statements make any statement about previous versions.
I can't find the KB article for Win95 (Q128932 "How Windows 95 Resolves Shortcut Links"), but here is something about WinNT: "The default shortcut resolution method is to resolve the link to the original location of the file (the "absolute" path) before looking at another path of where that file may or may not exist (the secondary or "relative" path)." http://support.microsoft.com/kb/158682 Those are both specifically about network shortcuts, but the mechanisim is the same.
OLE was implemented in Win32 on Win 3.x, however DLT seems to be limited to NFS file systems, starting with Win 2K (http://technet.microsoft.com/en-us/library/bb457112.aspx). — Preceding unsigned comment added by 203.206.162.148 (talk) 07:37, 28 November 2011 (UTC)[reply]

OS/2 has POSIX-like support for symlinks; Shadows are unrelated

[edit]

OS/2 does indeed support symlinks (not hardlinks) via extended attributes. These work on HPFS and JFS volumes, though I am not sure of FAT volumes, as EAs are stored differently. The reading and proper interpretation of such symlink data is dependent upon the application, however. Linux applications, ported using GCC, for the most part understand symlinks perfectly well.

The section pertaining to OS/2 as it now stands is completely irrelevant, as WPS shadows are not symlinks of any sort, as they have nothing to do with the filesystem whatsoever, and are only understood by the WPS. I suggest removing this mention entirely or at least referencing it in the context of WPS constructs. I am happy to provide language to re-work the OS/2 section. LewisR (talk) 23:11, 8 January 2012 (UTC)[reply]

"File or directory" is redundant

[edit]

A directory is a special type of file, so the many references to "file or directory" and variations thereof could be replaced by simply "file" for brevity. l0b0 (talk) 10:44, 7 August 2012 (UTC)[reply]

"Overview" section doesn't exclusively treat Windows

[edit]

The Overview sub-section is not exclusively about Windows, so it should be moved out of the Microsoft Windows section. l0b0 (talk) 11:24, 7 August 2012 (UTC)[reply]