1hash [ -Ldfmrv ] [ name[=value] ] ... 2 hash can be used to directly modify the contents of the command 3 hash table, and the named directory hash table. Normally one 4 would modify these tables by modifying one's PATH (for the com- 5 mand hash table) or by creating appropriate shell parameters 6 (for the named directory hash table). The choice of hash table 7 to work on is determined by the -d option; without the option 8 the command hash table is used, and with the option the named 9 directory hash table is used. 10 11 Given no arguments, and neither the -r or -f options, the 12 selected hash table will be listed in full. 13 14 The -r option causes the selected hash table to be emptied. It 15 will be subsequently rebuilt in the normal fashion. The -f 16 option causes the selected hash table to be fully rebuilt imme- 17 diately. For the command hash table this hashes all the abso- 18 lute directories in the PATH, and for the named directory hash 19 table this adds all users' home directories. These two options 20 cannot be used with any arguments. 21 22 The -m option causes the arguments to be taken as patterns 23 (which should be quoted) and the elements of the hash table 24 matching those patterns are printed. This is the only way to 25 display a limited selection of hash table elements. 26 27 For each name with a corresponding value, put `name' in the 28 selected hash table, associating it with the pathname `value'. 29 In the command hash table, this means that whenever `name' is 30 used as a command argument, the shell will try to execute the 31 file given by `value'. In the named directory hash table, this 32 means that `value' may be referred to as `~name'. 33 34 For each name with no corresponding value, attempt to add name 35 to the hash table, checking what the appropriate value is in the 36 normal manner for that hash table. If an appropriate value 37 can't be found, then the hash table will be unchanged. 38 39 The -v option causes hash table entries to be listed as they are 40 added by explicit specification. If has no effect if used with 41 -f. 42 43 If the -L flag is present, then each hash table entry is printed 44 in the form of a call to hash. 45 46rehash Same as hash -r. 47