type command
type -t command
example)
$ type -t test
buildin
$ type test
test is a shell builtin
内置命令比外部命令快,因为不需要从硬盘读入命令。
$ type awk
awk is /bin/awk
本文介绍了Shell中内置命令与外部命令的区别,内置命令因无需从硬盘加载而运行速度更快。例如,'type' 和 'type-t' 是用于检查命令是否为内置命令的示例。
type command
type -t command
example)
$ type -t test
buildin
$ type test
test is a shell builtin
内置命令比外部命令快,因为不需要从硬盘读入命令。
$ type awk
awk is /bin/awk
1529

被折叠的 条评论
为什么被折叠?