replace "realpath" with "readlink -f"