Scroll to navigation

readlink(1) General Commands Manual readlink(1)

NAME

readlink - Print value of a symbolic link or canonical file name.

SYNOPSIS

readlink [-f|--canonicalize] [-e|--canonicalize-existing] [-m|--canonicalize-missing] [-n|--no-newline] [-q|--quiet] [-s|--silent] [-v|--verbose] [-z|--zero] [-h|--help] [-V|--version] [files]

DESCRIPTION

Print value of a symbolic link or canonical file name.

OPTIONS

canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist
canonicalize by following every symlink in every component of the given name recursively, all components must exist
canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence
do not output the trailing delimiter
suppress most error messages
suppress most error messages
report error message
separate output with NUL rather than newline
Print help
Print version
[files]

VERSION

v(uutils coreutils) 0.7.0

EXAMPLES

Get the actual file to which the symlink points:

readlink path/to/file

Get the absolute path to a file:

readlink [-f|--canonicalize] path/to/file

The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail.

readlink (uutils coreutils) 0.7.0