Re: [hackers] Add realpath utility

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Mon, 16 Nov 2015 17:48:07 +0000

On Mon, Nov 16, 2015 at 12:19:40PM -0500, Random832 wrote:
> Dimitris Papastamos <sin_AT_2f30.org> writes:
> > Thanks for the patch. Can you demonstrate what realpath(1) adds
> > that sbase readlink(1) can't provide?
>
> readlink just provides the name a symlink points to. It doesn't resolve
> any symlinks in either the symlink's directory path, the directory path
> of the target, or if the symlink itself points to another symlink.
>
> realpath works on any file, collapses .. and . references, resolves any
> symlinks in any path component, and provides as its final answer an
> absolute path containing no symlinks.

Sure but sbase readlink -f also covers this. It uses realpath(3).
Received on Mon Nov 16 2015 - 18:48:07 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 16 2015 - 19:00:12 CET