* "rehash" Question
@ 2001-01-08 14:53 James Hanway
2001-01-08 15:45 ` Bob Koehler
0 siblings, 1 reply; 2+ messages in thread
From: James Hanway @ 2001-01-08 14:53 UTC (permalink / raw)
This is probably more of a generic UNIX question:
I placed executables into a directory that is on the global PATH for all
users. Users that are logged in at the time cannot "see" the next
executables until they either re-login or issue a "rehash" command in
their csh terminal windows. Why?
Based on just observation, I am guessing login's and rehash's generate a
list of available executables for a given login session. Is this the
case? I can't seem to find any man pages for the rehash command. I have
always thought that when a command is issued at a prompt, that the
system then searched the PATH directories. Is this actually the case in
unix?
Cheers,
James
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: "rehash" Question
2001-01-08 14:53 "rehash" Question James Hanway
@ 2001-01-08 15:45 ` Bob Koehler
0 siblings, 0 replies; 2+ messages in thread
From: Bob Koehler @ 2001-01-08 15:45 UTC (permalink / raw)
In article <3A59D463.319B23A5@m1a2r3.dfo-mpo.gc.cax>, James Hanway <hanwayj@m1a2r3.dfo-mpo.gc.cax> writes:
> This is probably more of a generic UNIX question:
>
> I placed executables into a directory that is on the global PATH for all
> users. Users that are logged in at the time cannot "see" the next
> executables until they either re-login or issue a "rehash" command in
> their csh terminal windows. Why?
>
It depends on the shell. csh hashes the data it finds in the PATH
when it starts, and doesn't really search the PATH unless you tell it
"rehash". Other shells actually search PATH for every command. If a
user was to start a new csh process, that one should pick up the new
command since it will hash on start.
As always in UNIX, it depends.
----------------------------------------------------------------------
Bob Koehler | Computer Sciences Corporation
NASA GSFC Flight Software | Federal Sector, Civil Group
| please remove ".aspm" when replying
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-08 15:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-08 14:53 "rehash" Question James Hanway
2001-01-08 15:45 ` Bob Koehler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox