Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Dereferencing a symlink...or that alike...



On 2013-08-17 at 22:05 -0700, Bart Schaefer wrote:
> I don't know of any external utility that will print *only* the target
> of the symlink.  E.g.

readlink(1) is part of GNU coreutils and is part of the base system on
FreeBSD, OpenBSD, etc.

% readlink etcetera
/etc

(On FreeBSD, at least, it's a hardlink to the stat(1) command, which
 switches behaviour if argv[0] shows it was invoked as readlink.)

-Phil



Messages sorted by: Reverse Date, Date, Thread, Author