Vista To Get Symlinks? 565
TheRealSlimShady writes "According to a post by Ward Ralston on the Windows server team's weblog, Vista server is to get symlinks as part of the SMB2 protocol." From the post: "In Vista/Longhorn server, the file system (NTFS) will start supporting a new filesystem object (examples of existing filesystem objects are files, folders etc.). This new object is a symbolic link. Think of a symbolic link as a pointer to another file system object (it can be a file, folder, shortcut or another symbolic link)."
Different than shortcuts (Score:5, Informative)
"Virtual folders", I believe it's used for (Score:5, Informative)
NTFS already does it since Win2K ! (Score:5, Informative)
http://www.sysinternals.com/Utilities/Junction.ht
Any feature new in Vista but the look and feel ?
What about booting the OS with less than about 20 services started and 256MB of memory used ?
No. (Score:5, Informative)
Re:NTFS already does it since Win2K ! (Score:3, Informative)
http://slashdot.org/article.pl?sid=00/03/02/08332
The links in the summary are broken though.
NTFS already has symlinks, has done for years (Score:4, Informative)
We can only hope (Score:1, Informative)
Lol, symlinks (Score:5, Informative)
Symbolic links make the Unix file system non-hierarchical, resulting in multiple valid path names for a given file. This ambiguity is a source of confusion, especially since some shells work overtime to present a consistent view from programs such as pwd, while other programs and the kernel itself do nothing about the problem.
http://plan9.bell-labs.com/sys/doc/lexnames.html [bell-labs.com]
NT *was* going to have executables that pretended to be files, i.e. when you opened the executable to get the contents it would run and return the output rather than the by bytes of the executable, with a special NT syscall to read the *real* contents. Kind of like a named pipe. I was looking forward to this but it didn't work out.
Re:Allow me to be the first to say... (Score:5, Informative)
$ fortune -m 'condemned'
...
Those who do not understand Unix are condemned to reinvent it, poorly. -- Henry Spencer
And those who don't understand fortune(1) are condemned to ask about quotes =)
Re:useful? really? (Score:3, Informative)
Man, you need to use symlinks to see how useful they are. As someone pointed before, symlinks are great to create compilations of files on a directory. Also, they are very useful if you want to use different types of libraries (DLLs) on different programs (in different directoires).
As for the "average user", as someone else said also, this symlink will surely help the file system Virtual folders or whatever is named. It is the same as the SQL oriented file system, you could ask, will the average user make use of SQL queries?, and the answer is that, they will, indirectley through the applications that are make use of that technology.
Remember, this symlink will be a feature of the FILESYSTEM, which will be used by the programs. I for one would preffer to have multiple symlinks to DLLS than to have to copy the libraries through all the hard disk (or maybe not DLLS but other files).
Re:We can only hope (Score:5, Informative)
Re:NTFS already does it since Win2K ! (Score:3, Informative)
Improve on symlinks? (Score:5, Informative)
1) When you move a destination object, symlinks don't follow the target . This leaves "broken" symlinks that refer to nothing. Why doesn't the mv command move these too?
2) When you symlink a symlinked folder, the root symlink is ignored. Let's say you symlink
3) Symlinks cause all kinds of weirds around chrooted file systems , especially ones on a different underlying filesystem. If you're not very careful, nothing is as it seems! Files go nowhere, files are accessable only sometimes, etc. It's logical when you understand and appreciate a symlink for what it is, just a referral, but it can be maddening when security contexts get distorted around a chroot...
Re:"Virtual folders", I believe it's used for (Score:5, Informative)
Re:NTFS already does it since Win2K ! (Score:5, Informative)
NTFS does support hardlinks and, as the developers of the NTFS driver for Linux recently discovered (see details in this thread [theaimsgroup.com]), it also supports symlinks, provided Microsoft Services For Unix are installed.
The important part of all this, is, I think, that open source tools ranging from the linux fs drivers (ntfs and cifs/smb) to the cygwin stuff should get updated and start managing the thing the way MS does it (on MS filesystems, of course).
Re:Yet more great (Score:3, Informative)
Five years to late [slashdot.org]
Re:NTFS already does it since Win2K ! (Score:3, Informative)
Soft links are represented as a special text file that contains the name of the linked file. The default behavior on opening a soft link is to redirect and open the target file instead. Alternatively, you can use readlink() to get the contents of the soft link directly.
Unix has had both kinds of link for aeons.
Re:No. (Score:1, Informative)
http://msdn.microsoft.com/library/en-us/fileio/fs
To be honest, I'm surprised it's only been there since Windows 2000.
Re:Lol, symlinks (Score:4, Informative)
or rather, I'll just provide a link to this
The Use of Name Spaces in Plan 9
Rob Pike
Dave Presotto
Ken Thompson
Howard Trickey
Phil Winterbottom
Bell Laboratories, Murray Hill, NJ, 07974 USA
http://plan9.bell-labs.com/sys/doc/names.html [bell-labs.com]
Re:Symbolic links? (Score:5, Informative)
Also, FAT had initially a flag indicating that an object is not a file, nor a folder, but a symlink. Unfortunately, the attribute got later used as a "Long Filename Part no. X" flag... talk about bad design..
Re:No. (Score:2, Informative)
Re:We can only hope (Score:3, Informative)
>supposed to do?
>It can:
>
> * Close the program (= Possible data loss)
> * Slow the speed at which the program is allowed to access certain files (= Increase
>the chance of race conditions, sometimes by a lot. It doesn't really solve anything
>either)
> * Make the symlinks "disappear" after a certain level of recursion (= Inconsistent data)
> * Do nothing (= Solves nothing)
WTF.....
The answer is "none of the above". The open() call returns -1 with an error code of EMLINK, which if the program is any good will be passed onto the user as "Error opening file: Too many links", for the user to do with as he pleases.
>None of these options are as good as the software actually detecting the symlinks itself.
>When I say "most" UNIX software checks for symlinks, I am only referring to software
>which would otherwise be at risk of infinite recursion.
And what pray tell is the software supposed to do if it detects a symlink and/or a recursive one with special symlink handling code? All it can do is do report it to the user right? So why put in special code to do that? Just checking the return of open() and reporting the code to the user does the exact same thing.
More Dupe than you think (Score:4, Informative)
Already has this (Score:3, Informative)
Reparse points (like links) http://msdn.microsoft.com/library/default.asp?url
Junctions (to mount file systems) http://msdn.microsoft.com/library/default.asp?url
Sparse files (highly underutilized) http://msdn.microsoft.com/library/default.asp?url
and of course the plain old short cuts that are really symbolic links in the traditional unix world.
I remember architecting a product to implement all unix based functionality in NT (IPC, memory mapped files, etc) and found NT40 to have that and more. Thats the time I really appreciated windows as a OS more mature than Unix.
The unfortunate part is people still think of DOS/Win95 code base when they think of windows. As a OS, W2K is much more mature in terms of the facilities they offer and as a filesystem, NTFS is way ahead.
Give me a feature in Unix and Im sure there is an equivalent in NT. Thousands of smart people working at Redmond are not idiots and millions of corporate architects proposing NT based solutions are not stupid either. They propose windows based technologies not just for looks (though end users do appreciate that).
Symlinks were a BSD invention (Score:4, Informative)
The commercial product, SysV, got symbolic links, but they had to compete in the real world.
Re:Symbolic links? (Score:3, Informative)
And, more "F.U.D." attempts by the 'pro-Unix/Linux/BSD' brothers @ "/.", as-per-usual... or, the usual "partially informed/incomplete data spouting rumor mill" is @ work here again, as-per-usual.
Take a read, so you are better informed:
http://www.sysinternals.com/Utilities/Junction.ht
-----
Win2K's version of NTFS supports directory symbolic links, where a directory serves as a symbolic link to another directory on the computer.
For example, if the directory D:\SYMLINK specified C:\WINNT\SYSTEM32 as its target, then an application accessing D:\SYMLINK\DRIVERS would in reality be accessing C:\WINNT\SYSTEM32\DRIVERS.
Directory symbolic links are known as NTFS junctions in Win2K.
Unfortunately, Win2K comes with no tools for creating junctions - you have to purchase the Win2K Resource Kit, which comes the linkd program for creating junctions.
I therefore decided to write my own junction-creating tool: Junction.
Junction not only allows you to create NTFS junctions, it allows you to see if files or directories are actually reparse points.
Reparse points are the mechanism on which NTFS junctions are based, and they are used by Win2K's Remote Storage Service (RSS), as well as volume mount points.
If you want to view reparse information, the usage for Junction is the following:
Usage: junction [-s]
-s
Recurse subdirectories.
If you want to create or delete a junction, use Junction like this:
Usage: junction [-d] []
To delete a junction specify the -d switch and the junction name.
-----
(NT's been there, & done that, ages ago already for DIRECTORY SYMBOLIC LINKS @ least... + the resource kit tools mentioned above, OR the tools offered by Dr. Russinovich & Bryce Cogswell @ SysInternals do the job in this matter as well as alternate methods of using what's already been in NTFS for ages now)
APK
P.S.=> "and giving the people what the want (10 years after everyone else). Go Redmond!" - by el_womble (779715) on Monday October 31, @06:41AM
They surely have, now, haven't they & for the last 12 years or more @ desktop/laptop levels up to Server OS + backoffice/industrial strength tools to match their Office Suite offerings + development tools?
So, with that statement of yours, I must agree:
Plus, 95%++ of the world's computers running Windows NT-based Operating Systems by now (e.g.-> NT/2000/XP/Server 2003), which run tons more hardwares than UNIX of any type does, + with more peripheral surrounding softwares for any imaginable purpose (thus, Win32 Os are far more ubiquitous + flexible) can't be TOO far wrong to second your statement now, can they? apk
The Fix: Aliases (Score:4, Informative)
Re:Symbolic links? (Score:3, Informative)
There is a huge difference between the two: a hard link is filesystem-level (simply a second entry in a directory to a file); a symlink is OS-level. One cannot cross filesystem boundaries (being filesystem-level), the other can.
Re:Symbolic links? (Score:4, Informative)
Re:Symbolic links? (Score:4, Informative)
Windows 2k and above have both hardlinks (which are available via standard tools) as well as symlinks, restricted to directories only and not available via the OS' tools.
Check Juctions [sysinternals.com] for the creation and handling of symlinks.
Re:Already has this (Score:2, Informative)
Now, with Windows 2000 and XP you might not be able to escape having a C: drive, as the OS expects it. But anything other drive that you add, including optical drives, can be mounted within that file system. I currently have three partitions and two optical drives. They are mounted as follows:
C:\
C:\Swap
C:\Documents and Settings\
C:\DVD
C:\CD-RW
Not suprising - any idea what NTFS 5 is capable (Score:2, Informative)
NTFS junction points are useful for alternate mounting.
The point of some key Windows Services are built for exactly this purpose
Reparse points are handy too
NTFS is a great file system, you just need to read the documentation..
Re:Different than shortcuts (Score:2, Informative)
NAME
open -- open or create a file for reading or writing
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <fcntl.h>
int
open(const char *path, int flags,
The flags specified are formed by or'ing the following values
O_NOFOLLOW do not follow symlinks
Re:Lol, symlinks (Score:4, Informative)
You're confused. Files in Unix filesystems have no hierarchy, with or without symbolic links. Files are quite independent of file names. Multiple directories may contain entries for the same file, the names need not even be the same. The same directory may reference the same file with multiple names. Note for examples that renaming a file changes the modification time of the
Symbolic links are a bit of a hack though, yes. But mostly because they must expose the limitations of "files are not the same as filenames" - not because they allow multiple paths to the same file.
--paulj
Re:Symbolic links? (Score:3, Informative)
That would be really funny if it was true.
It is, alas, false, and junctions do not become "a drive letter", they are virtual folders akin to Linux' directory symlinks (since junctions sadly don't handle the file level but only the directory one).
Re:I think we have a new kind of troll... (Score:5, Informative)
This story is a case in point. Symlinks are a hack that hides the fact that disk drive based namespaces are a crock. And a crock that's easily solved.
Unix is 30 years old, Linux copies it. Windows is not in the picture.
Linux / BSD et. al. offers very little innovation any more. Instead anything new is coming in through the user space and we end up with stuff like GnomeVFS and smb:// handlers.
The only real place where any real Unix like innovation has occured in recent times was in Bell Labs and the expresssions of that are Plan 9 and Inferno.
You can try some of the concepts out in user space through http://swtch.com/plan9port/ [swtch.com]
"Plan 9 from User Space (aka plan9port) is a port of many Plan 9 programs from their native Plan 9 environment to Unix-like operating systems.
supported systems : Linux (x86 and PowerPC), FreeBSD (x86), Mac OS X (Power PC), NetBSD (x86), OpenBSD (x86 and PowerPC), SunOS (Sparc)."
Re:Nevermind (Score:4, Informative)
As far as users are concerned, I suspect they won't know/see the difference. Creating symlinks will just work like creating shortcuts.
Only on BSD and Linux... you want readlink. (Score:3, Informative)
NAME SYNOPSIS DESCRIPTION RETURN VALUE
Re:More Dupe than you think (Score:3, Informative)
is one place to start. [microsoft.com]
Still, it'll be very nice to have real symlinks instead of shortcuts. It's what the shortcuts should have been all along.
Mac OS X already does it the RIGHT way. (Score:3, Informative)
Mac OS X (and all the way back to System 7 in 1990) did it right by creating aliases which use a two-factor plan to locate its target:
Aliases also store sufficient information about the volume they were located on that the Finder can mount the volume automatically (if it's on the network) or inform the user of exactly why it didn't work. This also allows aliases to cross filesystems, which symlinks can but hard links cannot.
This is why symlinks are such a stupid solution on UNIX, since that OS has no excuse - aliases could have been trivially implemented due to the dual-layer nature of the filesystem (inodes separate from hierarchy).
(Now, I agree completely with how sucky it is that the shell does not support them, and that aspect has been sucky since day 1. However, that has nothing to do with alias technology and everything to do with shell implementation.)
Re:NTFS already had symlinks? (Score:2, Informative)
Re:We can only hope (Score:3, Informative)
Re:Funny thing is... (Score:1, Informative)
Re:NTFS already does it since Win2K ! (Score:3, Informative)
Junction points, at least the ones created by the utility referred to, are in fact hard directory links. You can mount any directory from any NTFS volume as a directory at any point in any NTFS volume's tree, not just whole partitions.
I have used junction.exe many times to save a lot of reorganization by mounting a directory from one volume onto another when the other is full and there is no unallocated space to add. For example, you can move directories from "c:\Program Files" to "d:\Program Files" and then create junctions under "c:\program files" to the ones on d:. This will result in the associated programs running as if they had never been moved without any reinstallation.
Re:Symbolic links? (Score:3, Informative)
Actually, 95% of the world's computers are embedded microproccessors, most of which don't even run anything classified as an "operating system", let alone windows. I expect that what you meant was that 95% of PC's are running Windows NT based operating systems. I doubt that, there are still plenty of older, pre-XP home machines in use today, so probably as many as 15-20% of PC's are running Windows 9x-based operating systems. You could have just said 95% of the world's PC's are running Win32-based operating systems, and you probably would have been correct.
Re:FOUR, er FIVE symlink styles, all kinda *wrong* (Score:1, Informative)
1. Object manager symlinks (1 and 5 are both drive letter mappings)
2. Filesystem symlinks (3 and 4 are both NTFS reparse points)
3. Application symlinks (shortcuts are imlemented by OLE)
If you're writing an end-user application, you probably only care about application symlinks if you care at all (because standard dialogs follow them for you). The advantage of shortcuts is that they can track their target if moved to another directory, or even to another computer!
If you are writing a system utility (such as backup or indexing) you have to pay attention to filesystem symlinks (like in Unix) because you can choose to follow them or not. But otherwise your burden is no different than without symlinks because the existence of hard links means that you already have to keep track of which filesystem/file number combinations you have already processed.
Now if you think that's bad, imagine how much worse it is on Unix. The proliferation of filesystems has made it so that you don't even know what's really a file and what isn't. Only a truly naive program would try to backup and restore
dom