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

来源: 柚子科技、WordPress 主题、WordPress插件    日期: 2021-12-14    标签:,     作者: WordPress主题themes插件plugins开发定制    阅读数: 3

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

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

常用参数:

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

参考实例

别名命令:

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

内建命令:

[root@uziwp ~]# type cd cd is a shell builtin

关键字:

[root@uziwp ~]# type if if is a shell keyword

链接到文章: https://uziwp.com/4409.html

评论已关闭