Advertisement
Guest User

type demo

a guest
Mar 15th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. bash-4.2$ echo $SHELL
  2. /bin/bash
  3.  
  4. bash-4.2$ help type
  5. type: type [-afptP] name [name ...]
  6. Display information about command type.
  7.  
  8. For each NAME, indicate how it would be interpreted if used as a
  9. command name.
  10.  
  11. Options:
  12. -a display all locations containing an executable named NAME;
  13. includes aliases, builtins, and functions, if and only if
  14. the `-p' option is not also used
  15. -f suppress shell function lookup
  16. -P force a PATH search for each NAME, even if it is an alias,
  17. builtin, or function, and returns the name of the disk file
  18. that would be executed
  19. -p returns either the name of the disk file that would be executed,
  20. or nothing if `type -t NAME' would not return `file'.
  21. -t output a single word which is one of `alias', `keyword',
  22. `function', `builtin', `file' or `', if NAME is an alias, shell
  23. reserved word, shell function, shell builtin, disk file, or not
  24. found, respectively
  25.  
  26. Arguments:
  27. NAME Command name to be interpreted.
  28.  
  29. Exit Status:
  30. Returns success if all of the NAMEs are found; fails if any are not found.
  31.  
  32. bash-4.2$ type type
  33. type is a shell builtin
  34.  
  35. bash-4.2$ type git
  36. git is /usr/bin/git
  37.  
  38. bash-4.2$ git --version
  39. git version 1.8.1.5
  40.  
  41. bash-4.2$ type git
  42. git is hashed (/usr/bin/git)
  43.  
  44. bash-4.2$ type ls
  45. ls is aliased to `/usr/bin/ls $LS_OPTIONS'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement