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


Reply
  Search this Thread
Old 01-26-2006, 12:41 PM   #1
JesseMor
LQ Newbie
 
Registered: Sep 2004
Posts: 22

Rep: Reputation: 15
Unhappy bash : q : command not found (need help)


I was looking in the /etc directory, using ls –l and saw a file “zprofile -> profile” ( permissions are lrwxrwxrwx). Curious about contents of a link file, I did cat zprofile -> profile and saw something like “input is output”.

Normally, “q” gets one out of cat.



Here, it did not, so without even a prompt, I tried typing quit, exit, bye, disconnect, logout, but nothing seemed to get me out of this situation. Stuck, I did the un-thinkable and powered down. L



At power-up, it goes thru the hda1 (note FIXED-zero d-time) & continues with hda3, hda4, disc checks ok & puts up the usual login prompt.



I type in jem2 <enter>



Password: xxxxx <enter>



And it gives me:



bash : q : command not found

bash : q : command not found (twice as shown), then reverts back to original login prompt.



If I do same as above, except, leave passed blank and press <enter>, then the response is different from above in that the “bash : q : command not found” does NOT show up, rather “Login incorrect” & reverts to original login prompt.



Doing the insane and repeating these login attempts (and expecting different results), of course only proves the insanity.



What now?
 
Old 01-26-2006, 01:11 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

cat'ing from a file to a file linked to it will wipe the file. Somehow (and I'm not sure how) you've managed to get your 'q's, from trying to exit from the cat, into /etc/profile. Bash tries to run anything in this file when it starts, hence the 'bash : q : command not found'.

Dave

P.S. Ctrl-C gets you out of a cat process, not q.
 
Old 01-26-2006, 03:48 PM   #3
JesseMor
LQ Newbie
 
Registered: Sep 2004
Posts: 22

Original Poster
Rep: Reputation: 15
q command not found

Thank you very much!

I looked in profile using BOOT/ROOT floppies and found that it is terribly corrupted. It has all the trash in there that I typed in trying to get out of cat & nothing else. Things such as q, exit, logout, disconnect, etc.

Since I didn't set up this machine, I have no idea what was there nor how to re-generate whatever needs to be in profiles. How would a novice proceed from here?

JesseMor
 
Old 01-26-2006, 04:04 PM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
What distro is it?
 
Old 01-26-2006, 04:08 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What you did is to
cat the content of zprofile AND stdin into profile ...
In other words, after having put all of itself back into
itself you filled it up with whatever you typed trying to
stop the process ... a Ctrl-C should have fixed it.

That said: you're not "getting out of cat" at all, what you
get out of with a q is less.

What you wnated to do was a plain
less /etc/zprofile


Cheers,
Tink

Last edited by Tinkster; 01-26-2006 at 04:09 PM.
 
Old 01-27-2006, 12:57 AM   #6
JesseMor
LQ Newbie
 
Registered: Sep 2004
Posts: 22

Original Poster
Rep: Reputation: 15
distro

Quote:
Originally Posted by ilikejam
What distro is it?
Book that was with computer shows 3.5
In /etc/issue, shows 2.0.35
In /etc/slackware-version, shows 7.0.0
In /etc/motd, shows 2.2.16
At bootup, just before login, shows "Welcome to Linux 2.0.35
After ROOT login, shows 2.2.16
At LILO, just after Linux (extfs partition, it shows
Linuv 2.2.16 (root@Titan2)
gcc version egcs- 2.91.66 19998314/Linux egcs 1.1.2 release #1
Friday aug 18, 2000

So, in short, I don't know what distro.

JesseMor
 
  


Reply


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: command not found! Adil_uk Linux - General 14 04-09-2012 01:04 AM
bash -command not found- ALInux Linux - Newbie 3 12-30-2006 12:41 PM
bash: pg: command not found Chomper Programming 2 02-05-2005 02:22 AM
-bash: cp: command not found johnlittlepeap Fedora 2 11-15-2004 08:52 AM
bash: command not found jc80 Fedora 3 03-14-2004 03:11 PM

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

All times are GMT -5. The time now is 01:34 AM.

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