[petsc-dev] damn symlinks on windows

Satish Balay balay at mcs.anl.gov
Wed Oct 9 11:11:51 CDT 2013


On Tue, 8 Oct 2013, Chetan Jhurani wrote:

> mklink on NTFS does it the right way - no .lnk business
> or cygwin specific file format.
> http://en.wikipedia.org/wiki/NTFS_symbolic_link

Hm..

>>>>
Please note: For Windows 2000/XP, you would use an NTFS junction point.

The mklink command is used to create a symbolic link. It is natively available in the Command Prompt in Windows Vista/2008+ (not in PowerShell or as an executable). 
<<<<<<

Looks like its not really portable across all versions. And I wonder
if anyone is still using FAT32 for local drives.

>>>>>>>>>

C:\Users\balay>mklink
Creates a symbolic link.

MKLINK [[/D] | [/H] | [/J]] Link Target

        /D      Creates a directory symbolic link.  Default is a file
                symbolic link.
        /H      Creates a hard link instead of a symbolic link.
        /J      Creates a Directory Junction.
        Link    specifies the new symbolic link name.
        Target  specifies the path (relative or absolute) that the new link
                refers to.

C:\Users\balay>where mklink
INFO: Could not find files for the given pattern(s).

C:\Users\balay>bash

balay at msnehalem2 /cygdrive/c/Users/balay
$ mklink
bash: mklink: command not found

balay at msnehalem2 /cygdrive/c/Users/balay
$
<<<<<<<<<<<

Hm - Looks like this is this a built in feature for 'cmd' - and not useable from bash.
[Searching c: drive doesn't show anything]

Satish





More information about the petsc-dev mailing list