Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've found a description of hard links and junctions in Windows, however I'd like to know ,from the Windows UI or command prompt, how I can view the hard links of a particular file or folder?

share|improve this question
    
Exactly what do you mean by "view" in this context? –  John Gardeniers Oct 7 '11 at 1:51

4 Answers 4

up vote 19 down vote accepted

FSUTIL.EXE included in Windows XP and higher. Example:

fsutil.exe hardlink list C:\Windows\System32\notepad.exe

Sample results (from Windows 7):

\Windows\System32\notepad.exe

\Windows\notepad.exe

\Windows\winsxs\amd64_microsoft-windows-notepadwin_31bf3856ad364e35_6.1.7600.16385_none_9ebebe8614be1470\notepad.exe

\Windows\winsxs\amd64_microsoft-windows-notepad_31bf3856ad364e35_6.1.7600.16385_none_cb0f7f2289b0c21a\notepad.exe

share|improve this answer
    
Great, didn't know that... –  Massimo Oct 7 '11 at 5:37
    
Is there also any way to list soft links and junctions for a file? –  Massimo Oct 7 '11 at 5:38
1  
Found the FSUTIL docs on MSDN technet.microsoft.com/en-us/library/cc753059(v=WS.10).aspx –  John K Oct 7 '11 at 5:54
    
Looks like on Server 2003 fsutil doesn't support the hardlink list subcommand. Only hardlink create is shown by fsutil hardlink. –  bamccaig Nov 5 '13 at 17:23

This tool should be exactly what you need:

http://technet.microsoft.com/en-us/query/hh290814

share|improve this answer

Not directly what you need but may still be useful for such goal when used cleverly:
FINDDUPE, a standalone command line utility hosted at http://www.sentex.net/~mwandel/finddupe/ address, has side functionality, which allows listing all hardlinks within a directory recursively with the following call:
finddupe -listlink <directory_of_interest>

Here is an example of what one gets as an output:

Hardlink group, 2 of 2 hardlinked instances found in search tree:
  ".\1"
  ".\_1"

Number of hardlink groups found: 1

NOTE: There is a number of projects with the similar name on SourceForge, but nothing actually hosts the utility above as for now.

share|improve this answer
ln --list

should work.

There's also a shell extension 1

share|improve this answer
2  
There's no "ln" command in Windows... are you referring to some external tool? –  Massimo Oct 6 '11 at 16:47
    
schinagl.priv.at/nt/ln/ln.html –  drcursor Oct 6 '11 at 16:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.