Finding the original file of a symbolic link
Try this :
readlink -f /path/file
( last target of your symlink if there's more than one level )
If you just want the next level of symbolic link, use :
readlink /path/file
Edit 2020:
now, GNU coreutils own realpath
:
realpath /path/file
similar to readlink -f
by default
1.
ls -l bin
produce
lrwxrwxrwx 1 az az 14 Ноя 12 22:13 bin -> ../Gdrive/bin/
2.
file bin
produce
bin: symbolic link to `../Gdrive/bin/'
3.
stat bin
produce
File: «bin» -> «../Gdrive/bin/»