I am writing a shell script that takes file paths as input.
For this reason, I need to generate recursive file listings with full paths. For example, the file
This will give the canonical path (will resolve symlinks): realpath FILENAME
realpath FILENAME
If you want canonical path to the symlink itself, then: realpath -s FILENAME
realpath -s FILENAME