How to get the absolute path for a given relative path programmatically in Linux?
Incase of Windows we have the _fullpath() API. In other words, I mean
_fullpath()
Running on RedHat 5.3, realpath doesn't exist but readlink is installed. You can use it on relative paths and symlinks, plus it will resolve symlinks recursively for you. It's thus a better option that realpath in my opinion
readlink -f .