Bug 126425 - If command moved to different place on path, bash says file not found
If command moved to different place on path, bash says file not found
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-06-21 11:08 EDT by Robin Green
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-29 08:51:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Robin Green 2004-06-21 11:08:49 EDT
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 12:56:38 EDT
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 08:51:06 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.