You are here: >

Linux and Unix readlink command

readlink commandAbout readlink
readlink syntax
readlink examples
Related commands
Linux and Unix main page

About readlink

readlink prints the value of a symbolic link or canonical file name.

readlink syntax

readlink [OPTION]... FILE

Options

-f, --canonicalize canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist.
-e, --canonicalize-existing canonicalize by following every symlink in every component of the given name recursively, all components must exist
-m, --canonicalize-missing canonicalize by following every symlink in every component of the given name recursively, without requirements on components existence
-n, --no-newline do not output the trailing newline
-q, --quiet suppress most error messages
-s, --silent suppress error messages
-v, --verbose report error messages
--help display help and exit
--version output version information and exit

readlink examples

readlink symbolic-link-name

Displays the full, canonical pathname of the symbolic link symbolic-link-name.

ln — Create a link, or a symbolic link, to a file or directory.