开发者

shell command which returns the target of the static link

开发者 https://www.devze.com 2023-03-22 16:33 出处:网络
Is there a built-in unix/linux command which returns the target of a specific symbolic link? for example if i made a symbolic link:

Is there a built-in unix/linux command which returns the target of a specific symbolic link?

for example if i made a symbolic link:

%> ln -s b开发者_JS百科uild_07-24-2011 latest

is there a command "foo" that does this:

%> foo latest
build_07-24-2011

i know that i can parse the ll -l latest with awk to get the same thing, just wondering if there's a more elegant way to do this.


Take a look at readlink(1).

0

精彩评论

暂无评论...
验证码 换一张
取 消