Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 866.1k
  • 205
  • 1.8k
  • 2.3k
Source Link
sharkant
  • 3.8k
  • 12
  • 33
  • 48

what argument does hash -t require?

All paths to directories with Linux commands are stored within a variable called $PATH. Once a command is being called its path is stored additionally in a notebook called hash to speed up the look up next time.

The hash is a shell builtin command and help hash gives a very short description. One option -t is described as printing all paths collected within the hash, and so I typed:

hash -t 

being sure I would get a listing of the hash's content.

However I got this:

bash: hash: -t: option requires an argument

  • What argument does it require?

  • What am I doing wrong?

  • How to show the content of the hash table?