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

# To get the actual file to which the symlink points:
readlink <filename>

# To get the absolute path to a file:
readlink -f <filename>