In OS X, how can I dereference a symbolic link to a canonical file name? (i.e. one starting with
That is, I'm after the equivalent of GNU readlink's
kapow:~$ greadlink -f .bash_profile /Users/mjs/.config/home/.bash_profile
readlink instead returns a relative link:
kapow:~$ readlink .bash_profile .config/home/.bash_profile
stat(1) does have an amazing number of options, but I couldn't figure out the right combination to do what I want.