假设我设置了一个符号链接:
ln -s /root/Public/mytextfile.txt /root/Public/myothertextfile.txt
有没有办法看到myothertextfile.txt的目标是使用命令行?
解决方法
使用-f标志打印规范化版本.例如:
readlink -f /root/Public/myothertextfile.txt
来自man readlink:
-f,--canonicalize canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist