I've created some hard links on my Windows 7 file system using mklink. It was some time ago and I can't remember for sure where, or which files. When I use Explorer, all files look the same. When I use the command line and type "dir", they all look the same.
How do I find hard links? Or how do I determine whether a specific file IS a hard link?
Answer
All files are hard links, with link counts of at least 1.
This is why the files look the same. They are the same. What you seem to be looking for are files where there are more than one link to the file. There's very little that distinguishes a file with a link count greater than one from a file with a link count of one … except the link count (and some odd behaviour with respect to attributes and date stamps).
And that is dead easy to check with the find
command that is in Microsoft's SFUA utility toolkit, that runs in the Subsystem for Unix-based Applications:
find . -links +1
No comments:
Post a Comment