Bug 126425

Summary: If command moved to different place on path, bash says file not found
Product: [Fedora] Fedora Reporter: Robin Green <greenrd>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: medium    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-29 12:51:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Robin Green 2004-06-21 15:08:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040608

Description of problem:
When I install a binary in a different place bash can't find it any
more, even though it's still on the PATH.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a dummy script in /usr/local/bin/dummy
2. Run dummy
3. mv /usr/local/bin/dummy /usr/bin

Actual Results:  bash: /usr/local/bin/dummy: No such file or directory

Expected Results:  Should have run the script from its new location

Additional info:

Workaround: type hash -r

Comment 1 Tim Waugh 2004-06-28 16:56:38 UTC
Reported upstream.  This behaviour has been there ever since I
remember -- I thought it was intentional for some reason.

Comment 2 Tim Waugh 2004-06-29 12:51:06 UTC
Upstream maintainer says:

That's what the `checkhash' option does.  Since POSIX mandates this
behavior, it happens when bash is running in posix mode, too.