Ugh. I found the prior answers a bit wanting for a few reasons: in particular, they don't resolve multiple levels of symbolic links, and they are extremely "Bashy". While the original question does ex...
shell 脚本中,通常会使用相对路径来做处理,但有时候,我们也许需要用到绝对路径。 在shell怎么获取一个文件或目录的绝对路径呢? 也许你会立马想到realpath(如果你写过php的话),那么shell支持这个命令吗?看一下这里你就知道了。 Realpath appears to come from debian, and is not part of coreutils,Rea...
最新评论