Is there a Windows 7 equivalent to the *NIX ability to create a hard link to /dev/null?

Posted by minameismud on Super User See other posts from Super User or by minameismud
Published on 2010-05-25T12:55:49Z Indexed on 2010/05/25 13:02 UTC
Read the original article Hit count: 260

I saw another question here that the Windows equivalent to /dev/null is simply NUL. I also know that you can use the mklink command to make sym links (shortcuts) from the command line:

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.

When I try to use the /j switch to make a hard link ("junction") instead of a simple shortcut to NUL, I get:

C:\>mklink /j "C:\Program Files\MyNewHardlinkFolder" NUL
Local volumes are required to complete the operation.

I can create shortcuts to NUL all day long using the /d switch, but I would much prefer the hard link. Any ideas?

© Super User or respective owner

Related posts about Windows

Related posts about shortcuts