Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I installed ethtool using yum install ethtool and then removed it using rpm -e --nodeps ethtool because when I tried to remove ethtool with yum it was going to remove a bunch of important dependencies like php, httpd, etc.

When I run any command which shouldn't exist such as fakecommand I get this message:

[root@test sbin]# fakecommand
-bash: fakecommand: command not found
[root@test sbin]#

However, when trying to run ethtool after removing it with rpm -e --nodeps ethtool I get No such file or directory instead of No such file or directory:

[root@test sbin]# ethtool
-bash: /sbin/ethtool: No such file or directory
[root@test sbin]#
share|improve this question

1 Answer 1

To fix this, all you have to do is restart the ssh connection. Turns out, it was just a client-sided cache.

share|improve this answer
3  
Specifically, from the man page: "[b]ash uses a hash table to remember the full pathnames of executable files. hash -r would have fixed the problem as well. –  Mark Wagner Dec 24 '13 at 0:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.