readlink -f - My programs and scripts needs a real path and not a a symbolic link
readlink -f file1
/home/user/dir/file1
=======================
My programs and scripts needs a real path and not a a symbolic link. How to I determine a real path of any directory under Linux / UNIX like operating systems? How do I remove references to /./, /../ and extra ‘/’ character in path?
Use
readlink -f /path/to/file/or/dir
command under RHEL / CentOS.
/home/user/dir/file1
=======================
My programs and scripts needs a real path and not a a symbolic link. How to I determine a real path of any directory under Linux / UNIX like operating systems? How do I remove references to /./, /../ and extra ‘/’ character in path?
Use
readlink -f /path/to/file/or/dir
command under RHEL / CentOS.
Comments
Post a Comment