Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bash-4.2$ echo $SHELL
- /bin/bash
- bash-4.2$ help type
- type: type [-afptP] name [name ...]
- Display information about command type.
- For each NAME, indicate how it would be interpreted if used as a
- command name.
- Options:
- -a display all locations containing an executable named NAME;
- includes aliases, builtins, and functions, if and only if
- the `-p' option is not also used
- -f suppress shell function lookup
- -P force a PATH search for each NAME, even if it is an alias,
- builtin, or function, and returns the name of the disk file
- that would be executed
- -p returns either the name of the disk file that would be executed,
- or nothing if `type -t NAME' would not return `file'.
- -t output a single word which is one of `alias', `keyword',
- `function', `builtin', `file' or `', if NAME is an alias, shell
- reserved word, shell function, shell builtin, disk file, or not
- found, respectively
- Arguments:
- NAME Command name to be interpreted.
- Exit Status:
- Returns success if all of the NAMEs are found; fails if any are not found.
- bash-4.2$ type type
- type is a shell builtin
- bash-4.2$ type git
- git is /usr/bin/git
- bash-4.2$ git --version
- git version 1.8.1.5
- bash-4.2$ type git
- git is hashed (/usr/bin/git)
- bash-4.2$ type ls
- ls is aliased to `/usr/bin/ls $LS_OPTIONS'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement