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.

Comments

Popular posts from this blog

HAproxy logging

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all