Jean Jean - 1 year ago 112
Linux Question

How to get full path of a file?

Is there an easy way I can print the full path of


file.txt = /nfs/an/disks/jj/home/dir/file.txt


dir> <command> file.txt

should print


Answer Source

Use readlink:

readlink -f file.txt
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download