This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Windows 2000 Junction Points


On Thu, Dec 06, 2001, Gerald Villemure wrote:

> There is a tool in the Win2K ResKit called "linkd.exe" which will alow you
> to create "Junction Points" from the command line.
> 
> Hope this helps,
> Gerald

Yes, this tool exists and I use it :)
But I mean to say, wouldn't it be nice and consistent if
ln -s <dir> <link> worked like linkd as opposed to creating a
shortcut. I am aware of "mount" under cygwin but the mount is not
exported to Windows.

No big deal. I can survive.
Thanks!


> 
> ----- Original Message -----
> From: "Kim, Anthony" <Anthony.Kim@vw.com>
> To: <cygwin@cygwin.com>
> Sent: Thursday, December 06, 2001 4:52 PM
> Subject: Windows 2000 Junction Points
> 
> 
> > Windows 2000 (having NTFS 5.0) allows the creation of directory
> > symbolic links. This can be used as mount points for hard drive
> > volumes or to symlink directories across file systems. In the
> > literature, the directory links are called "junction points".
> >
> > Disk Administration snap-in can be used to mount a drive to a
> > directory or you can use linkd.exe (ResKit) or junction.exe
> > (SysInternals).
> >
> > This is the closest thing I can find to simulate:
> >
> > ln -s /source /destination
> >
> > Now here's my question:
> >
> > When you perform a directory symlink in cygwin, you end up with a
> > .LNK file even though you can cd into the link.
> >
> > $ pwd
> > /mnt
> > $ ln -s /cygdrive/c /mnt/test
> > $ ls -l
> > total 20
> > dr-xr-xr-x    6 Administ Administ        0 Dec  6 09:47 ./
> > dr-xr-xr-x   12 Administ Administ     4096 Nov 28 12:48 ../
> > dr-xr-xr-x   12 Administ Administ     8192 Dec  6 09:47 c/
> > dr-xr-xr-x    3 Administ Administ     4096 Dec  3 12:48 d/
> > dr-xr-xr-x    5 Administ Administ     4096 Dec  3 12:48 e/
> > drwxr-xr-x    1 vciadmin Administ        0 Dec  4 08:35 h/
> > lrwxrwxrwx    1 vciadmin Administ       94 Dec  6 09:47 test ->
> /cygdrive/c/
> >
> > $ cd test
> > $ ls
> > <directory listing>
> >
> > This works as expected. However, from outside cygwin:
> >
> > $ cmd
> >
> > G:\cygwin\mnt>dir
> > dir
> >  Volume in drive G is DATA
> >   Volume Serial Number is 98D5-B7E1
> >
> >    Directory of G:\cygwin\mnt
> >
> >    12/06/2001  09:47a      <DIR>          .
> >    12/06/2001  09:47a      <DIR>          ..
> >    11/28/2001  11:26a      <JUNCTION>     c
> >    11/28/2001  11:26a      <JUNCTION>     d
> >    11/28/2001  11:27a      <JUNCTION>     e
> >    12/04/2001  08:34a      <JUNCTION>     h
> >    12/06/2001  09:47a                  94 test.lnk
> >
> > So the effect is lost.
> >
> > Because hard links work in cygwin as expected, is it far fetched
> > for ln -s <directory> <linkname> to create actual junction points
> > instead of .LNK files?
> >
> > If I'm way off base here, please feel free to let me know :)
> >
> > Cheers!
> >
> > --
> > Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> > Bug reporting:         http://cygwin.com/bugs.html
> > Documentation:         http://cygwin.com/docs.html
> > FAQ:                   http://cygwin.com/faq/
> >
> >

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]