PDA

View Full Version : No such file or directory?


granthac
08-26-2004, 01:05 PM
Hi just a quick question from a unix idiot. When I open my terminal I get a message like this:

Last login: Thu Aug 26 11:27:18 on console
Welcome to Darwin!
tcsh: /sw/bin/init.csh: No such file or directory.
[humn147-101-dhcp:~] chrisgra%


does anyone know what is going on with that third line? I am trying to access a server, and it requires me to use the terminal, but it is not working, so I am guessing it has something to do with that third line. Any help would be greatly appreciated!!
-Granthac

jhaffner
08-26-2004, 01:16 PM
> tcsh: /sw/bin/init.csh: No such file or directory.

Something in your .profile or .tcshrc or .cshrc file is looking for the init.csh file in /sw/bin/ directory.

Look in your home directory for one of the files above. You can see what's in them using the cat command.

cat .tcshrc

Are you using the tcsh shell?

granthac
08-26-2004, 01:19 PM
okay tried that, still get no such file or directory. i am not sure about the shell, how can i figure out what shell I am using? Thanks for the quick response.

yellow
08-26-2004, 01:29 PM
Sounds like you had fink installed and decided to delete it.

echo $SHELL

Will tell you what shell you're using, at least, what shell the Terminal.app is using.

jhaffner
08-26-2004, 01:30 PM
Hi,
try this:

echo $SHELL

when I type that, I get

/bin/bash

You can also use the 'ls' command to show you all the files in the current directory by adding the '-la' flags, as in:

ls -la

This command will show you all the files in your directory, even the "invisible" ones that start with a "."

granthac
08-26-2004, 01:32 PM
Yes i did have fink installed and I deleted not knowing what a mess I was getting into. The ecco $shell just gives me: command not found

yellow
08-26-2004, 01:34 PM
The ecco $shell just gives me: command not found

echo, not ecco. If you typed echo and that didn't work, then do this:

/bin/echo $SHELL

granthac
08-26-2004, 02:02 PM
Okay yes I am using a tcsh shell. I can see the "invisible" files as well. I am not really sure what to do with them.

trevor
08-26-2004, 02:13 PM
granthac, what are your settings that are visible when you open Terminal > Preferences? Have you tried just trashing your Terminal prefs file?

Trevor

granthac
08-26-2004, 02:17 PM
Yea I already tried the terminal trashing technique. I even stumped the guy down at my local mac store.

yellow
08-26-2004, 02:26 PM
I even stumped the guy down at my local mac store.

Trust me, that's not hard, IME.

Do you have a .tcshrc file or a .login file when you look at your directory listing?

granthac
08-26-2004, 02:30 PM
No now that you mention it, there are neither of those files there. The closest thing that I have is .cshrc

jhaffner
08-26-2004, 02:30 PM
Okay yes I am using a tcsh shell. I can see the "invisible" files as well. I am not really sure what to do with them.

OK, the .cshrc file is probably the one causing the problem.

type cat .cshrc to see the file's contents.

It will probably contain a line with /sw/bin/init.csh listed. If it does, you'll need to open the file in a text editor (my favorite is BBEdit) and remove the line.

I don't know that this error is preventing you from logging into a server, but one never knows.

granthac
08-26-2004, 02:35 PM
When I do the cat .login all i get is no such file or directory.

granthac
08-26-2004, 02:36 PM
wait I may have screwed up disregard the above post

jhaffner
08-26-2004, 02:38 PM
wait I may have screwed up disregard the above post

No, you didn't screw up, I modified my post. We were posting over each other.

granthac
08-26-2004, 02:41 PM
Okay sorry... so I need to remove this line of code. Can I open it in the text editor that is on my machine? Or do i need to open it with BBE edit

jhaffner
08-26-2004, 02:44 PM
Okay sorry... so I need to remove this line of code. Can I open it in the text editor that is on my machine? Or do i need to open it with BBE edit

No, any text editor you're comfortable with will do. A key point to remember in UNIX is that almost everything outside of compiled applications is text files.

granthac
08-26-2004, 02:52 PM
THATS IT!! THanks so much!! I owe you a pint or two!

jhaffner
08-26-2004, 02:54 PM
Glad to help!

Did it solve your server connection problem?