LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   "clear" and "reset" bash commands broken (http://www.linuxquestions.org/questions/linux-general-1/clear-and-reset-bash-commands-broken-459528/)

AviJacobson 06-29-2006 02:22 PM

"clear" and "reset" bash commands broken
 
I recently noticed upon exiting from root in a bash shell (i.e., "exit" after "su -") that I got an error "-bash: clear: command not found"

I couldn't figure out why this was happening, so I tried entering "clear" in a command prompt window, both as a user and as root. In both cases, I noticed that neither "clear" nor "reset" works in bash, and neither binary can be found on my filesystem. How did this happen? How do I fix it?

I'm using FC4, kernel 2.6.16-1.2111_FC4.

reddazz 06-29-2006 02:27 PM

There is no need to post the same question in more than one thread. I am not sure what could have caused your problem (it could be anything e.g. a security breach or someone accidentally deleted the commands). Try reinstalling the coreutils package.

daihard 06-29-2006 02:29 PM

Quote:

Originally Posted by AviJacobson
I recently noticed upon exiting from root in a bash shell (i.e., "exit" after "su -") that I got an error "-bash: clear: command not found"

I couldn't figure out why this was happening, so I tried entering "clear" in a command prompt window, both as a user and as root. In both cases, I noticed that neither "clear" nor "reset" works in bash, and neither binary can be found on my filesystem. How did this happen? How do I fix it?

I'm using FC4, kernel 2.6.16-1.2111_FC4.

Both clear and reset are included in the package named "ncurses-5.4-19.fc4" on my FC4 machine. I would suggest that you make sure you have that package installed on your machine.

AviJacobson 06-29-2006 02:51 PM

Apologies for posting my query in separate forums. Being a newbie here and a veteran of Usenet (where crossposting is a tradition), I did not realize this was against the rules.

Yes, it was an ncurses issue. It's a long story but here is the gist: In order to solve a dependency issue on a particular software package (rpm), I needed to install a particular file (libtinfo.so.5) which is supposed to be part of ncurses but which Feodra's RPM version of ncurses did not include. So I searched and found a non-rpm version of ncurses that included libtinfo.so.5, and unpacked, compiled and installed it (without first uninstalling the RPM version). However, I still couldn't get the other rpm installed (it still reported a dependency problem), so I gave up on it. I then did make uninstall on the ncurses version I had installed.

When I understood that my clear and reset problems might have been caused by my ncurses installation/uninstallation, I checked to see if the old ncurses rpm was still installed. rpm -q showed that it was, and it did not occur to me that the rpm database would still list ncurses as installed even if I had inadvertantly deleted some of the files it had installed.

After reading your posting, I downloaded the ncurses rpm (same version I already had) and reinstalled it using --force. That did the trick.

Thanks for your quick response, and I apologize once again for the duplicate posting.

reddazz 06-29-2006 03:59 PM

Ahh, for some reason I thought they were part of the coreutils package. Anyway I am glad you got it sorted.

daihard 06-29-2006 11:20 PM

Quote:

Originally Posted by reddazz
Ahh, for some reason I thought they were part of the coreutils package. Anyway I am glad you got it sorted.

Yeah, glad you got it to work too. :cool:

XavierP 07-03-2006 06:28 AM

Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php


All times are GMT -5. The time now is 09:37 AM.