Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re(3): Is this directory a subdirectory of another directory?

by dmmiller2k (Chaplain)
on Mar 16, 2002 at 04:36 UTC ( [id://152153]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Is this directory a subsirectory of another directory?
in thread Is this directory a subdirectory of another directory?

Not for nothing, but it's NTFS that supports hard (not symbolic) links, not NT/2K/XP, per se.

  1. NT's own CLI (CMD.EXE) doesn't even support them directly.
  2. You need a separate console mode program (ln.exe, from the POSIX subsystem -- or MKS Toolkit, Cygwin, U/WIN, et al) to create links.
  3. The standard Windows Explorer is not even (apparently) link aware.

I think Juerd's point was true if you assume typical Windows users (i.e., not everyone knows how to create multiple links to a file).

  • Comment on Re(3): Is this directory a subdirectory of another directory?

Replies are listed 'Best First'.
(VVOT) Actually Win2k+ NTFS does support symlinks..
by demerphq (Chancellor) on Mar 18, 2002 at 12:36 UTC
    Not for nothing, but it's NTFS that supports hard (...) links, not NT/2K/XP, per se

    True. Sorry... :-)

    supports hard (not symbolic) links,

    Actually thats not correct, DOS has supported SUBST for a long time which is a form of symbolic link (as is indeed the volume naming scheme in general, although granted this is not what one normally thinks of as a symlink) and the Win2k version of NTFS (so I wasnt realy wrong) supports junctions (symbolic links) through reparse points. You are correct however in that like hard links there are no standard tools for creating junctions. However the ever useful trove of MS power tools www.systeminternals.com has the tool junction which can create them. But windows explorer shows them as a standard directory, but cmd.exe does not.

    Both hard and symbolic links (junctions) are illustrated in the following little cmd.exe trace. (D:\Development\test_funky\extra_level\my_symlink junctions D:\Development\test_funky\itsa_symlink)

    D:\Development\test_funky>copy con here.txt Test! ^Z 1 file(s) copied. D:\Development\test_funky>ln here.txt itsa_symlink\howzat.txt D:\Development\test_funky>dir itsa_symlink Volume in drive D is DataStore Volume Serial Number is 2892-9D2C Directory of D:\Development\test_funky\itsa_symlink 18/03/02 13:15 <DIR> . 18/03/02 13:15 <DIR> .. 18/03/02 13:15 7 howzat.txt 1 File(s) 7 bytes 2 Dir(s) 2,915,024,896 bytes free D:\Development\test_funky>dir Volume in drive D is DataStore Volume Serial Number is 2892-9D2C Directory of D:\Development\test_funky 18/03/02 13:15 <DIR> . 18/03/02 13:15 <DIR> .. 18/03/02 12:50 <DIR> extra_level 18/03/02 13:15 7 here.txt 18/03/02 13:07 <JUNCTION> itsa_symlink 1 File(s) 7 bytes 4 Dir(s) 2,915,024,896 bytes free D:\Development\test_funky>type itsa_symlink\howzat.txt Test! D:\Development\test_funky>echo This too >>itsa_symlink\howzat.txt D:\Development\test_funky>type here.txt Test! This too D:\Development\test_funky>tree Folder PATH listing for volume DataStore Volume serial number is 0006FE80 2892:9D2C D:. +---extra_level ¦ +---my_junction ¦ +---my_link +---itsa_symlink D:\Development\test_funky>echo this as well >>extra_level\my_junction\ +howzat.txt D:\Development\test_funky>type here.txt Test! This too this as well D:\Development\test_funky>
    Sorry if this is off topic, but MS gets beaten up enough when they deserve it to be beaten up when they dont. ;-) Also you never know somebody out there might be just dying to know how to do junctions under W2k *even bigger grin*

    Yves / DeMerphq
    --
    When to use Prototypes?
    Advanced Sorting - GRT - Guttman Rosler Transform

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://152153]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found