hash
é um shell embutido.
Se você estiver usando bash
, verifique:
help hash
Para sua conveniência, aqui está:
hash: hash [-lr] [-p pathname] [-dt] [name ...]
Remember or display program locations. Determine and remember the full pathname of each command NAME. If no arguments are given, information about remembered commands is displayed. Options: -d forget the remembered location of each NAME -l display in a format that may be reused as input -p pathname use PATHNAME as the full pathname of NAME -r forget all remembered locations -t print the remembered location of each NAME, preceding each location with the corresponding NAME if multiple NAMEs are given Arguments: NAME Each NAME is searched for in $PATH and added to the list of remembered commands. Exit Status: Returns success unless NAME is not found or an invalid option is given.
Para outros shells, verifique o local habitual para builtins. Por exemplo, para zsh
, verifique:
man zshbuiltins
What hash -r does and what it returns.
hash -r
remove todos os locais lembrados da tabela de hash e retorna sucesso.