Linux Command - type
The Linux type command displays command type information.
Get type info for ls command:
type ls
Example output for different typs:
$type find
find is hashed (/usr/bin/find)
$type ls
ls is aliased to `ls --color=auto'
$type pwd
pwd is a shell builtin
$
Check two different commands at once:
type pwd ls
Force path lookup even if alias:
$type -f ls
ls is aliased to `ls --color=auto'
$type -P ls
/usr/bin/ls
$
All locations for command:
$type -f ls
ls is aliased to `ls --color=auto'
$type -P ls
/usr/bin/ls
$
Return the name on disk if it has one:
type -p find
Single word for the type:
$type -t ls
alias
$type -t pwd
builtin
$