On 11/05/2012 02:07 PM, Marek Kielar wrote: > I would expect a hard link to be included only when the > same file was listed again but through an additional hard > link with some other name, and that also included only > once, if given multiple times on the command line.
I've read that sentence two or three times, and I'm afraid I still don't know what it means. Which sort of underscores that we're in a tricky area here. If I understand you correctly, one objection to your approach is that it's not trivial to determine whether a file is "an additional hard link with some other name". For example, after "mkdir d; touch f; ln f d/f; ln -s . dot", the file names "dot/f" and "f" name the same hard link, whereas the file names "d/f" and "f" name different hard links, but this cannot be determined merely by invoking lstat on "d/f", "f", and "dot/f".