In its simplest form, readlink will dereference any symlink component in a given path recursively till all symlinks are replaced by real path components.
$ readlink -f <path>For this to work, all symlinks must exist and point to a valid path. The only exception is the last (or real) path component which need not exist.
Passing -e option to readlink can enforce a check for existance of all path components (including the last one). If any of the symlinks is broken, an error is generated.
$ readlink -e <path>
Sometimes it is advisable not to worry if the path components exist in the file system. readlink has a -m option to do this.
For further information, see $ man readlink