How to show full path of a file including the full filename in Mac OSX terminal?
From here: https://stackoverflow.com/a/4031502/804713
macports and homebrew provide a coreutils package containing greadlink (GNU readlink). credit to Michael Kallweitt post in mackb.com
brew install coreutils
greadlink -f file.txt
There are many ways to do that; here is one example that may work for you:
claw:~ jonv$ echo `pwd`/`ls config.in.php`
/Users/jonv/config.in.php
If you want more examples, there are a bunch on this post at stackoverflow.
In Mac OSX, do the following steps:
cd
into the directory of the target file.- Type either of the following terminal commands.
ls "`pwd`/file.txt"
echo $(pwd)/file.txt
- Replace
file.txt
with your actual file name. - Press Enter.