type命令 – 显示指定命令的类型

Linux命令4年前 (2021)发布 AI观察员
157 0 0

type命令用来显示指定命令的类型,判断给出的指令是内部指令还是外部指令。

语法格式:type [参数] [命令]

常用参数:

lias 别名
keyword 关键字,Shell保留字
function 函数,Shell函数
builtin 内建命令,Shell内建命令
file 文件,磁盘文件,外部命令
unfound 没有找到

参考实例

别名命令:

[root@xtuos.com ~]# type ls
ls is aliased to `ls --color=auto'

内建命令:

[root@xtuos.com ~]# type cd
cd is a shell builtin

关键字:

[root@xtuos.com ~]# type if
if is a shell keyword

© 版权声明

相关文章

天猫U特购  京东优惠购        京东优惠    天猫优惠