READLINK(1)

NAME
readlink - print symbolic link target or canonical file name

SYNOPSIS
readlink [-f] [-n] path

DESCRIPTION
readlink writes the target of path, if it is a symbolic link, to stdout. If not, readlink exits with a non-zero return value.

OPTIONS

-f  Canonicalize path, which needn't be a symlink, by recursively following every symlink in its path components.

-n  Do not print the terminating newline.

SEE ALSO
readlink(2), realpath(3)