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.
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 likels -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:04find . -links +1
. Additionally I want to mention the tool ls.exe which provides the same asls
on linux – nixda Aug 13 '13 at 14:18ls -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:32ls -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