type 命令被用于判断另外一个命令是否是内置命令
主要参数:
-a 显示一个名字的所有可能
-t 判断一个名字当前是否是alias、keyword、function、builtin、file
-p 查看一个外部命令的执行路径
-P 查看内部命令路径
alias 别名
keyword 关键字,Shell保留字
function 函数,Shell函数
builtin 内建命令,Shell内建命令
file 文件,磁盘文件,外部命令
unfound 没有找到
[root@localhost zhangy]# type -a ls ls is aliased to `ls --color=auto' ls is /bin/ls [root@localhost zhangy]# type httpd httpd is /usr/sbin/httpd [root@localhost zhangy]# type -at ls alias file [root@localhost zhangy]# type -t ls alias [root@localhost zhangy]# type httpd httpd is /usr/sbin/httpd [root@localhost zhangy]# type -p nginx /usr/sbin/nginx [root@localhost zhangy]# type -P kill /bin/kill
评论(0)
暂无评论