Bug 126425 - If command moved to different place on path, bash says file not found
Summary: If command moved to different place on path, bash says file not found
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 1
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-21 15:08 UTC by Robin Green
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-06-29 12:51:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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):
bash-2.05b-34

How reproducible:
Always

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.


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