linux get full path

Shell
readlink -f file.txt #file
readlink -f Downloads #folder
Source

Also in Shell: