Find out about links
This command:

    stat -f "%N%SY" symbolicLinkName


will produce the output:

    symbolicLinkName -&gt; linkedFileName


(-f is the "format" option for "stat".  The %N in the format is the filename of symbolic link and the %SY is the way to print out the name of the file it points to with the string " -> " before it. (The S usually means to print the field as a string but it has the special meaning for "Y", the name of the file pointed to, which adds the arrow before the file name.)