OS X: get full path of file using realpath
➜ /Applications realpath iBooks.app
/Applications/iBooks.app
➜ /Applicationsrealpath is a command line utility that is
included in most UNIX distributions but not Mac OS X.
Thanks to Stuart Campbell,
a minimal implementation is provided
here, and my
fork.
If you use homebrew, you can tap my
repo, and install it using
homebrew.
brew tap iveney/mocha
brew install realpathViola! Now you can get the full path of file in console. A nice thing
I often use is to chain it with pbcopy to copy the full path to
the OS X clipboard.
Comments