美文网首页
每日一个linux命令15-which

每日一个linux命令15-which

作者: 1519f8ccc7b0 | 来源:发表于2017-04-19 14:47 被阅读0次

    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
    

    相关文章

      网友评论

          本文标题:每日一个linux命令15-which

          本文链接:https://www.haomeiwen.com/subject/baxhzttx.html