On POSIX systems, and possibly others, a file can have multiple names (known as hardlinks) or can itself contain the name of another file in such a way that the system substitutes that other file for most operations on a file (these are symlinks). For various platforms, are similar features available, and, if so, how best to determine if two seemingly different names are in fact the same file?
This question was also asked in Seekers of Perl Wisdom as Portable way to determine if two names refer to the same file?. The discussion there may also be of interest.
Originally posted as a Categorized Question.