I have used readlink -f
and readlink -e
on multiple occasions to resolve symlinks and as far as I can recall, they give the same results. The man page for readlink
from man readlink
says:
-f, --canonicalize
canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist
-e, --canonicalize-existing
canonicalize by following every symlink in every component of the given name recursively, all components must exist
After reading the man page, although I understand the technical differences between the -f
and -e
options, I can't think of specific situations where I would use either option. Are there specific use cases and circumstances where one may prefer to use readlink -f
to readlink -e
and vice versa?