Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

I just created a hardlink in Windows 7 using mklink. When I use dir the output doesn't indicate that the new hardlink is a hardlink. Instead it looks exactly like the file it is pointing to.

Example output from dir:

05/16/2013  12:07 AM            40,448 HardlinkToOriginal
05/16/2013  12:07 AM            40,448 OriginalFile

On Windows 7 how do you check to see if a file is a hardlink?

I know that you can do: fsutil.exe hardlink list OriginalFile and this will tell you that HardlinkToOriginal is a hardlink, but you need a-priori knowledge that is not available. Ideally I would like something like ls -al on Linux where if the file is a link then the command tells you it is a link and shows you where it points to.

share|improve this question

marked as duplicate by nixda, Tog, Mokubai, Breakthrough, Dave M Aug 14 '13 at 13:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
I know that you can do: fsutil.exe hardlink list OriginalFile and this will tell you that HardlinkToOriginal is a hardlink, but you need a-priori knowledge that is not available. Ideally I would like something like ls -al on Linux where if the file is a link then the command tells you it is a link and shows you where it points to. –  Trevor Boyd Smith Aug 13 '13 at 14:04
    
I guess this is what you are looking for: superuser.com/questions/366739/… find . -links +1. Additionally I want to mention the tool ls.exe which provides the same as ls on linux –  nixda Aug 13 '13 at 14:18
    
Are you sure that ls -al "shows you where it points to" for hard links? (Surely, it does so for symbolic links aka softlinks.) –  Arjan Aug 13 '13 at 14:32
    
@Arjan you are correct. On linux ls -al does not show hardlinks. You have to use the solution from the superuser question here. –  Trevor Boyd Smith Aug 13 '13 at 14:46

1 Answer 1

I don't believe you can. In fact, if you delete OriginalFile, you'll still have HardlinkToOriginal available.

share|improve this answer
    
That is the entire point of using hard links rather than soft links. :) –  Hennes Aug 13 '13 at 14:27

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