LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 06-29-2006, 03:22 PM   #1
AviJacobson
LQ Newbie
 
Registered: Apr 2005
Location: Berkeley, CA
Distribution: Fedora FC5
Posts: 19

Rep: Reputation: 0
"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.
 
Old 06-29-2006, 03:27 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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.
 
Old 06-29-2006, 03:29 PM   #3
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Rep: Reputation: 34
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.
 
Old 06-29-2006, 03:51 PM   #4
AviJacobson
LQ Newbie
 
Registered: Apr 2005
Location: Berkeley, CA
Distribution: Fedora FC5
Posts: 19

Original Poster
Rep: Reputation: 0
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.
 
Old 06-29-2006, 04:59 PM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Ahh, for some reason I thought they were part of the coreutils package. Anyway I am glad you got it sorted.
 
Old 06-30-2006, 12:20 AM   #6
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Rep: Reputation: 34
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.
 
Old 07-03-2006, 07:28 AM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
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
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 02:03 AM
"clear" and "reset" bash commands broken AviJacobson Linux - Software 1 06-29-2006 03:31 PM
Where to download precompiled bash binaries, such as "time" and "top"? elinuxqs Linux - Newbie 12 11-14-2005 09:36 PM
what is difference between "reset" and "clean " commands? zameer_india Linux - Newbie 2 01-10-2005 07:23 AM
bash-2.05b# Xlib: extension "XFree86-DRI" missing on display ":0.0". citrus Linux - General 8 02-22-2004 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration