每日一个linux命令15-which

1. 命令解析

命令用途

显示命令的全部路径到标准输出。

命令格式

which [options] [--] COMMAND [...]

命令参数

--version, -[vV] Print version and exit successfully.
--help, Print this help and exit successfully.
--skip-dot Skip directories in PATH that start with a dot.
--skip-tilde Skip directories in PATH that start with a tilde.
--show-dot Don't expand a dot to current directory in output.
--show-tilde Output a tilde for HOME directory for non-root.
--tty-only Stop processing options on the right if not on tty.
--all, -a Print all matches in PATH, not just the first
--read-alias, -i Read list of aliases from stdin.
--skip-alias Ignore option --read-alias; don't read stdin.
--read-functions Read shell functions from stdin.
--skip-functions Ignore option --read-functions; don't read stdin.

2. 示例

2.1 显示ls命令的路径

[root@test headTest]# which ls
alias ls='ls --color=auto'
    /usr/bin/ls
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • linux资料总章2.1 1.0写的不好抱歉 但是2.0已经改了很多 但是错误还是无法避免 以后资料会慢慢更新 大...
    数据革命阅读 13,105评论 2 33
  • Introduction What is Bowtie 2? Bowtie 2 is an ultrafast a...
    wzz阅读 6,135评论 0 5
  • 如果婚姻也像投资的话,那么我买的是保险。 学经济的都知道,我们投资策略有很多种啊,有的人喜欢高风险高收益,比如...
    67fbaec5208f阅读 320评论 0 1
  • 摄于皇家美孚 我的家乡
    维娜写作阅读 224评论 0 0
  • 我要做一个勤洗衣物,勤换床单被罩的美丽少女。阿爸妈妈姐姐都超级爱我。我要努力好好学习好好工作,过上自己想要的生活。...
    小公主1111阅读 296评论 0 0

友情链接更多精彩内容