[CentOS] get /full/path/filename.ext from filename.ext

Jonathan Billings billings at negate.org
Wed Dec 10 01:11:56 UTC 2014


On Tue, Dec 09, 2014 at 03:57:03PM -0500, ken wrote:
> You'd think this functionality would be included already in one or
> another linux utility.  It's kinda like the complement to the
> 'basename' utility.  I've looked into the dark corners of ls, stat,
> file, bash, type, find, and a few other linux standards, but nothing
> seems to do this.

'readlink -f FILE'

The -f (or --canonicalize) follows symlinks and prints the canonical
path.

-- 
Jonathan Billings <billings at negate.org>



More information about the CentOS mailing list