Forrest logo
back to the readlink tool

readlink:tldr:e7056

readlink: Get the actual file to which the symlink points.
$ readlink ${filename}
try on your machine

The command readlink ${filename} is used to retrieve the value of a symbolic link file.

Here is how it works:

  1. readlink is the command that is used to read the value of a symbolic link.

  2. ${filename} is a placeholder for the name of the symbolic link file you want to read. You need to replace ${filename} with the actual filename or path of the symbolic link.

When you execute this command, it will return the path or file that the symbolic link is pointing to.

For example, let's say you have a symbolic link called mylink that points to a file called myfile.txt. If you run the command readlink mylink, it will output myfile.txt, which is the actual path or file that mylink is linked to.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the readlink tool