hash (built-in Bash command)

Content

 

Data

License: GNU GPLv3 +
Version number: GNU Bash 5
Developer / owner: Free Software Foundation Inc.

Short description:

The hash built-in Bash command manual page and help. The hash command is a tool for annotating or displaying the location of programs.

 

 

Man page output

man bash
[...]
       hash [-lr] [-p filename] [-dt] [name]
              Each time hash is invoked, the full pathname of the command name is  determined  by
              searching the directories in $PATH and remembered.  Any previously-remembered path-
              name is discarded.  If the -p option is supplied, no path search is performed,  and
              filename  is  used  as  the full filename of the command.  The -r option causes the
              shell to forget all remembered locations.  The -d option causes the shell to forget
              the remembered location of each name.  If the -t option is supplied, the full path-
              name to which each name corresponds is printed.  If  multiple  name  arguments  are
              supplied  with -t, the name is printed before the hashed full pathname.  The -l op-
              tion causes output to be displayed in a format that may be reused as input.  If  no
              arguments  are  given, or if only -l is supplied, information about remembered com-
              mands is printed.  The return status is true unless a name is not found or  an  in-
              valid option is supplied.
[...]

 

 

Help output

hash --help
hash: hash [-lr] [-p útvonal] [-dt] [név ...]
    Programok helyének megjegyzése vagy megjelenítése.
    
    Meghatározza és megjegyzi minden megadott NÉV parancs teljes útvonalát.
    Ha nincs NÉV megadva, az összes megjegyzett parancsot listázza.
    
    Kapcsolók:
      -d        minden megjegyzett NÉV helyének elfelejtése
      -l        bemenetként újrahasználható formátumban listázzon
      -p útvonal        az ÚTVONAL használata a NÉV teljes útvonalaként
      -r        minden megjegyzett hely elfelejtése
      -t        minden megadott NÉV megjegyzett helyének kiírása,
                több név esetén a helyek előtt a NÉV kiírása
    Argumentumok:
      NÉV       Minden NÉV megkeresése a $PATH-ban, és hozzáadása a
                megjegyzettek listájához.
    
    Kilépési kód:
    Sikerrel tér vissza, kivéve, ha a NÉV nem található vagy érvénytelen
    kapcsolót kap.

 

Related Content