Try realpath.
~ $ sudo apt-get install realpath # may already be installed
~ $ realpath .bashrc
/home/username/.bashrc
To avoid expanding symlinks, use realpath -s.
The answer comes from “bash/fish command to print absolute path to a file”.
Try realpath.
~ $ sudo apt-get install realpath # may already be installed
~ $ realpath .bashrc
/home/username/.bashrc
To avoid expanding symlinks, use realpath -s.
The answer comes from “bash/fish command to print absolute path to a file”.