Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Terminal problems

Terminal problems
Thread Tools
ttoth
Junior Member
Join Date: Oct 2000
Status: Offline
Reply With Quote
Sep 22, 2002, 11:49 AM
 
Hi, I'm relatively new to the terminal in OS X (or any other -nix) for that matter. I've used it in the past mostly for pars and unrar-ing items and once in a while VCDGear. However, ever since I've upgraded to Jaguar, everytime I type a command in the terminal, it tells me "command not found". I think that the problem is somehow related to what I first see when I start terminal. I used to see a welcome to Darwin and something else in 10.1.x. Now I don't get that and the name of my computer is listed then followed by my user name. I don't remember this being done in 10.1. I know it had my user name, but I don't remember what was before it.

I even tried some of the commands in the thread "what are you favorite Terminal commands" and they also told me "command not found".

Is there anything I have to do after installing Jaguar to make terminal work for me again like it did? I didn't change the directories of any of my usually used apps.

Thanks for your help.
     
Filmo
Forum Regular
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 22, 2002, 02:38 PM
 
I'm having the exact same problem.

I'm having to type the entire directory path to execute programs such as mysqladmin instead of how I was able to do it before by just typing the command name. I get the "command not found" error.
--
Filmo the Klown
     
Wevah
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Sep 22, 2002, 03:17 PM
 
Try throwing this in at the start of ~/.tcshrc (create it if it's not already there):


source /usr/share/tcsh/examples/rc
source /usr/share/tcsh/examples/login


Just those two lines...I'm sure there's a "better" solution, but this solved the problem for me.
     
ttoth  (op)
Junior Member
Join Date: Oct 2000
Status: Offline
Reply With Quote
Sep 22, 2002, 03:25 PM
 
Originally posted by Wevah:
Try throwing this in at the start of ~/.tcshrc (create it if it's not already there):


source /usr/share/tcsh/examples/rc
source /usr/share/tcsh/examples/login


Just those two lines...I'm sure there's a "better" solution, but this solved the problem for me.
Is there a way to make this run every I load up terminal? It works, but I don't want to have to type that in every time.
     
Filmo
Forum Regular
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 22, 2002, 04:53 PM
 
Originally posted by ttoth:


Is there a way to make this run every I load up terminal? It works, but I don't want to have to type that in every time.
put the code into the file named '.tcshrc' which is a hidden file in your user directory. On mine, I had '.cshrc' from before, so I simply appened it to the head of that file and it now works fine.

to view hidden files use 'ls -a' or 'ls -la'. They are denoted with a leading period.
--
Filmo the Klown
     
ttoth  (op)
Junior Member
Join Date: Oct 2000
Status: Offline
Reply With Quote
Sep 22, 2002, 07:03 PM
 
Originally posted by Filmo:


put the code into the file named '.tcshrc' which is a hidden file in your user directory. On mine, I had '.cshrc' from before, so I simply appened it to the head of that file and it now works fine.

to view hidden files use 'ls -a' or 'ls -la'. They are denoted with a leading period.
OK, what if I don't have one? I have a .tcsh history. I tried to create one like Wevah suggested, but it didn't work, it said I couldn't name a file starting with a ".". I used textedit. Is there something else I'm supposed to use?

Thanks for all the help, by the way.
     
Mactoid
Grizzled Veteran
Join Date: Sep 2000
Location: Springfield, MA
Status: Offline
Reply With Quote
Sep 22, 2002, 07:46 PM
 
BBEdit (or probably anything other than TextEdit), or a command line editor like vi.
We hope your rules and wisdom choke you / Now we are one in everlasting peace
-- Radiohead, Exit Music (for a film)
     
Paul McCann
Mac Enthusiast
Join Date: Nov 2001
Location: Adelaide, South Australia
Status: Offline
Reply With Quote
Sep 22, 2002, 09:05 PM
 
Originally posted by Mactoid:
BBEdit (or probably anything other than TextEdit), or a command line editor like vi.
Unfortunately not: seems that the carbon save dialog deactivates the "save" button when there's a leading space in the filename. So *blat* to any carbon apps for doing this job, including BBEdit.

Just crank open a new terminal window and bake a .tcshrc by following this easy recipe; all the ingredients you need are readily available. (Look Ma, no editor...) The "%" in what follows represents your unix prompt, so don't type it in!!

% cd

% cat > .tcshrc

[[[[[[Now copy the two lines that you want from the posts above, and paste them into the terminal window. Then hit return. Then control-d]]]]]]

You should now be smelling the wonderful aroma of home cooking. Check that everything looks like it should by viewing the file:

% less .tcshrc

If that looks OK, just open a **new** terminal window and see if your commands are now recognised. (The one in which you created the file has already been through the initialization phase: if you want it to read the file .tcshrc again you'll need to enter the command "source .tcshrc".)

Best of luck,
Paul
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Sep 22, 2002, 09:08 PM
 
Originally posted by Mactoid:
BBEdit (or probably anything other than TextEdit), or a command line editor like vi.
I would recommend AGAINST trying to use vi--ESPECIALLY if you don't know what .tcshrc is.

Type this in your terminal to create a .tcshrc file:

/usr/bin/pico ~/.tcshrc

This will get you into a text editor where the keyboard shortcuts are rather easy to figure out (they are listed on the bottom of the screen). Note that ^ means CTRL.

Adding the /usr/bin/ in front of pico tells the terminal where pico is located. This will get past the fact that you are having issues with your $PATH.

Once you have added the recommended lines, you will type ctrl-O to save (then press enter) and then ctrl-X to exit. Those are both listed at the bottom of the screen.
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
Mactoid
Grizzled Veteran
Join Date: Sep 2000
Location: Springfield, MA
Status: Offline
Reply With Quote
Sep 22, 2002, 09:49 PM
 
Originally posted by Paul McCann:
Unfortunately not: seems that the carbon save dialog deactivates the "save" button when there's a leading space in the filename. So *blat* to any carbon apps for doing this job, including BBEdit.
I'm positive I've edited hidden files in BBEdit before. Can you just not create them? (i'd check but i'm not at a mac)
We hope your rules and wisdom choke you / Now we are one in everlasting peace
-- Radiohead, Exit Music (for a film)
     
ttoth  (op)
Junior Member
Join Date: Oct 2000
Status: Offline
Reply With Quote
Sep 22, 2002, 10:12 PM
 
Originally posted by Paul McCann:



% cd

% cat > .tcshrc

[[[[[[Now copy the two lines that you want from the posts above, and paste them into the terminal window. Then hit return. Then control-d]]]]]]

You should now be smelling the wonderful aroma of home cooking. Check that everything looks like it should by viewing the file:

% less .tcshrc


Best of luck,
Paul
Ahhh, the sweet smell of success. Thanks, that worked wonderfully.
     
Paul McCann
Mac Enthusiast
Join Date: Nov 2001
Location: Adelaide, South Australia
Status: Offline
Reply With Quote
Sep 23, 2002, 09:14 PM
 
Originally posted by Mactoid:
I'm positive I've edited hidden files in BBEdit before. Can you just not create them? (i'd check but i'm not at a mac)
It's pretty ugly. You can use the command line tool for BBEdit to modify existing dotfiles:

% bbedit ~/.cshrc

for example, but your out of luck as far as creating them from with the application goes. In fact, having just tried, it's not clear to me if you can even open existing files "going command-o", so to speak. Seems not. Hidden is hidden. Blrrrk.

Cheers,
Paul (not going command-O today: too cold)
     
   
Thread Tools
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 11:00 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,