Slashdot Mirror


Vista's Limited Symlinks

An anonymous reader writes, "Symlinks haven't really been added to Windows Vista. It seems that the calls to the Windows Vista symlink API only occur during the creation of such files or when accessing them from Windows Explorer. What this means is, you can't access symlinks from another OS. To be fair, you probably didn't expect to be able to dual-boot into XP and suddenly have access to the symlinks you created on the Vista partition earlier that day. But then again, you probably expected to be able to access these symlinks through a network share/UNC path or as files on a webserver. But you can't." From the article: "Clearly, Vista's symlink API isn't complete — hopefully this is something that can be patched via a hotfix and that we don't have to wait for Fiji to get something as simple as UNC support built in."

12 of 271 comments (clear)

  1. Re:Shortcuts are nothing new by kimvette · · Score: 5, Informative

    No, what is being discussed here is links, e.g., creating an additional filename referencing an inode.

    http://win32.mvps.org/ntfs/lnw.html
    http://en.wikipedia.org/wiki/NTFS_symbolic_link
    http://answers.google.com/answers/threadview?id=34 1355

    NTFS does support links, but as usual from Microsoft, it's half-baked and only the bare minimum required for POSIX compliance was implemented. From sysinternals (now a Microsoft site) you can download a utility for manipulating NTFS links, or you can install the free Services for Unix (again, from Microsoft's web site) to get the M$ version of ln.

    --
    The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
  2. Junctions by wandazulu · · Score: 4, Informative

    I can't RTFA because of web error, but while I haven't tried Vista's idea of symlinks, I have used junctions, which were introduced in Win2000. To me, symlinks are one of the best features of Unix and on my Mac and Linux machines, I use them quite extensively. On Windows, while the junction API was available, no Microsoft-specific tools made use of them (that I could find), and resorted to a freeware program that implemented the junction api.

    Whoa, big mistake. Junctions *do* work, but, and I think this is why Microsoft didn't promote or encourage their use, none of their other tools support them. In other words, doing a search of a drive that has junctions can lead to infinite recursion depending on how the junction is created. No Windows tools understand the "Don't follow symlinks" command that Unix tools have, and I had a few programs even crash whenever I tried to save to a junctioned-folder (Visual Studio was guaranteed to crash on me).

  3. don't use NTFS by drgonzo59 · · Score: 5, Informative
    Ext3 has great symlink support ;)

    Try this and a ext3 file system. I have all my Documents and the whole user directory on an ext3 and it works great. I can also access it from Linux if I want...

    1. Re:don't use NTFS by drgonzo59 · · Score: 3, Informative
      Subjectively it works great for me, I copy large media files and visibly it works no slower than a corresponding NTFS or FAT partition did. However I did not benchmark it exactly so it could be slower. Shoot the author an email and ask him, nobody knows the internals of the driver (and the possible speed penalties) better than them.

      The only thing I would be worried is corruption not speed. I have never had problems, but I would not put a financial database on it either, just because it is somewhat new and "experimental"...

  4. Re:Shortcuts are nothing new by Anonymous Coward · · Score: 0, Informative
    No, what is being discussed here is links, e.g., creating an additional filename referencing an inode.
    That would be a "hard link". Grandparent was right, sym(bolic) links (unix "ln -s") are like shortcuts: rm the symlink and you don't erase the file it was linking too (whereas you would if the link was referencing the same inode). The only difference is that Windows Vista now implements symlinks directly in the filesystem instead of through .lnk files.
  5. Re:Shortcuts are nothing new by emurphy42 · · Score: 3, Informative

    Symbolic links can also become outdated if the target moves. It's hard links that can't.

  6. Re:Huh? Symlinks were in XP/2000 NTFS all the time by ozzee · · Score: 4, Informative

    At first blush you would think so, but the semantics of a windows NTFS symlink is more like a mount point.

    Firstly, you can't use normal "commands" to create/delete NTFS symlinks. The collection of system calls to create a symlink are badly documented and incomplete.

    The big differences are (from memory):

    • If you attempt to delete an NTFS symlink using normal "remove" system calls, you delete the file being linked to.
    • If you rename a symlink, you're renaming the file being linked to.
    • There are no "relative" symlinks (i.e. ln -s x y)
    • In *nix, if xxx is a symlink to a directory then xxx refers to the symlink while xxx/ refers to the location linked to
    • ... probably more, I can't think of anything else right now, I'll go do some more research later.

    So while there is a similar function called a "reparse point" it is more like "mount" that it is like a a true UNIX symlink.

    Also, most of the Windows tools just don't deal with link (hardlinks or symlinks). If you do a hardlink from one file to another and check to see disk usage of a directory, the file is counted twice. Most unix tools (du etc) will not count hardlinked files twice and symlinks are counted as the disk space the symlink uses not the file it points to.

    Symlinks are a very powerful tool and are very mature in the *nix world. Windows is just simply way behind on this one.

  7. Re:Windows' FS / the alternate universe story by Kaetemi · · Score: 2, Informative
    drive letters are just silly
    You don't really need to use them. In Windows you can perfectly access the volume where you installed it by simply using "\". You can also mount a volume to a folder, Control Panel > System and Maintenance > Computer Management > Disk Management > Right Click a Volume > Change Drive Letter and Paths > Add > Mount in "\blahblah" (make sure you first create the folder) > OK, and then you can just access that volume without using drive letters by doing "\blahblah" (at least, it seems to be working that way here, on vista), and you can also access these volume folder thingies from the network if it or it's parent's folder is shared. :)
    --
    Kaetemi
  8. If they would have kept their original ideas by Iloinen+Lohikrme · · Score: 2, Informative

    I remember back from the beginning of 90's, around the time when Windows NT 3.11 came to markets, that vision behind NT was that it would be as modular as possible and allow swapping of lots of components beginning from the kernel to file-system. This was actually reported in lots of computer news papers, but it seems from now that it was just hype and hopeful wishes. Now it seems that the code base of NT and it's successors is so mingled that trying to swap components from it would make the system die in a split second.

  9. Re:Windows' FS / the alternate universe story by drgonzo59 · · Score: 2, Informative
    There is not obsession with UNIX there is obsession with "common sense", security, stability, reliability. UNIXes at the moment fit that list most of the time. Tomorrow it could be Plan9 or QNX or some other exotic thing, I don't care. I am not a more Linux fanboy than I am a Windows fanboy or a Honda or Wal-Mart fanboy I just use what makes sense at the time (yap, sorry no brand loyalty at all here).

    I mean, they could always port GNU userland over to the NT kernel, but dont MS already do that (or something similar) in their UNIX resource thing, which you can download.

    You are referring to POSIX I presume. Well, have you seen any native Unix code running on Windows lately? I didn't! Windows POSIX compliance is a joke, it was more of a marketing ploy to tell their client ("we even run Unix!") but in reality it is very broken. That is why you have Cygwin...

  10. Re:Shortcuts are nothing new by listen · · Score: 2, Informative

    If you rm a one link to an inode, (or close a file descriptor), it reduces the inodes usage count by one. When the count reaches zero, the blocks referenced by the inode are marked free. The behaviour you describe would be utterly horrendous.

  11. Re:Shortcuts are nothing new by Ucklak · · Score: 2, Informative

    It also sounds like a puppy granting wishes but that isn't what the article is about.

    That so called "shortcut" feature that has been around since Windows 3.1 isn't a 'link' as it works on POSIX complaint systems. It is a shortcut that gives the user - not the computer - a quick way to access a directory. It cannot handle I/O functions.

    --
    if you steal from one source, that is plagiarism, if you steal from many, well, that's just research.