whereis & which & type Flashcards

1
Q

whereis

A

whereis locates the binary, source and manual files for the specified command names.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

whereis

  • b, search only for binaries
  • B <dirs>, define binaries lookup path</dirs>
  • m, search only for manuals and infos
  • M <dirs>, define manual and infos lookup path</dirs>
  • s, search only for sources
  • S <dirs>, define sources lookup path</dirs>
A
  • f, terminate <dirs> argument list</dirs>
  • u, search for unusual entries
  • l, output effective lookup paths
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

which

A

which returns the pathnames of the files (or links) which would be executed in the current environment, had its arguments been given as commands in a strictly POSIX-conformant shell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

which -a filename

A

-a, print all matching pathnames of each argument.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

type

A

Display information about command type. For each NAME, indicate how it would be interpreted if used as a command name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

type

  • a
  • f
  • P
  • p
  • t
A
  • a, Display all locations containing an executable named NAME.
  • f, Suppress shell function lookup.
  • P, Force a PATH search for each NAME.
  • 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 ‘’ for NAME.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly