添加“-c”规范选项以打击“类型”内置命令以遵循符号链接

如果您发出命令,“类型”内置命令便于查找将使用哪些可执行文件。但是在一些发行版中,尤其是在使用/ etc / alternatives时,某些可执行文件被埋在层和符号链接层中,很难找到哪一个。如果将上述命令放入.bashrc中,它会添加一个“-c “选项的类型命令,将通过符号链接杂交并打印将被执行的实际文件。
.

0

linux命令:type () { if [ "$1" = "-c" ]; then shift; for f in "$@"; do ff=$(builtin type -p "$f"); readlink -f "$ff"; done; else builtin type $typeopts "$@"; fi; } } fi; "$@"; $typeopts type builtin else done; "$ff"; -f readlink "$f"); -p type ff=$(builtin do "$@"; in f for shift; then ]; "-c" = "$1" [ if { () type type () { if [ "$1" = "-c" ]; then shift; for f in "$@"; do ff=$(builtin type -p "$f"); readlink -f "$ff"; done; else builtin type $typeopts "$@"; fi; }rootopen.com
linux命令:type () { if [ "$1" = "-c" ]; then shift; for f in "$@"; do ff=$(builtin type -p "$f"); readlink -f "$ff"; done; else builtin type $typeopts "$@"; fi; } } fi; "$@"; $typeopts type builtin else done; "$ff"; -f readlink "$f"); -p type ff=$(builtin do "$@"; in f for shift; then ]; "-c" = "$1" [ if { () type type () { if [ "$1" = "-c" ]; then shift; for f in "$@"; do ff=$(builtin type -p "$f"); readlink -f "$ff"; done; else builtin type $typeopts "$@"; fi; }rootopen.com
wjeb 2018-04-30 09:09:48
输出

评论

相关推荐
共收录0条命令行
这里是记录和分享命令行的地方, 所有命令行都可以进行评论、提交替代方案.

热门文章