readlink -f filename
gives the full absolute path. but if the file is a symlink, u'll get the final resolved name.