[shell] - type command

来源:互联网 发布:跨境电商进口数据分析 编辑:程序博客网 时间:2024/06/05 03:55

Syntax: 

type [option] name

Description:

display the type of 'name', e.g.: alias, built-in, file and so on.

Options:

-a display ALL possible types for command - 'cmd_name', e.g.: 'ls' type perhaps is 'alias' and 'file(/bin/ls)';

-f only give out the shell function's info;

-p only display the external command info(file) ;

-t  only return the brief(short) type info;

Valid Types:

alias, keywords (shell), function (shell), builtin (shell), file (external commands, or file), unfound.


Example:

bash# type -a ls
ls is aliased to `ls --color=auto'
ls is /bin/ls

bash#type -at ls

alias
file

0 0
原创粉丝点击