portable realpath
D. Hugh Redelmeier
hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Tue Dec 13 15:38:39 UTC 2011
| From: Antonio Sun <antoniosun-N9AOi2cAC9ZBDgjK7y7TUQ at public.gmane.org>
| Anyone knows a portable way to get realpath, ie, the canonical file name of
| a symbolic link?
I find the term "canonical" odd. I realized that the term is (at
least) used in realpath(1). But files in UNIX and Linux don't have
canonical names (i.e. a guaranteed to be unique name).
- a volume can be mounted more than one place
- a file can have multiple names (hard links), all of equal status.
Normally there are no hard links to directories (unless you count .
and ..), but that restriction has been questioned.
What realpath -f does is simply replace symbolic links by their referents.
Perhaps it could be called evaluation or dereferencing.
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list