Terminal commands not working {clear, pico, etc..}

After Upgrading to Snow Leopard I am trying to work out of the terminal (using git) and some of the basic commands are not working. Things like trying to use clear and pico to edit files return this error.

-bash: clear: command not found

my paths looks like this

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin

Can any one help me out with that? (I am new to the Terminal so putting things in laments terms would be appreciated)

Thanks for any help!

MacBook Pro, Mac OS X (10.6), Intel Core 2 Duo 2.8 GHz

Posted on Nov 20, 2009 5:42 PM

Reply
11 replies

Nov 20, 2009 8:02 PM in response to Nils C. Anderson

when i type the $ls -l `whereis clear pico nano` it gives me the same error,

-bash: whereis: command not found

and then it just lists the directory. but is i just do ls -l clear or ls -l pico it gives me responses that look like the ones you have posted...

ls -l clear
-rwxr-xr-x 1 root wheel 50768 May 18 2009 clear
ls -l nano
-rwxr-xr-x 1 root wheel 324320 May 18 2009 nano
ls -l pico
lrwxr-xr-x 1 root wheel 4 Oct 1 15:48 pico -> nano

is this something where I can just copy the /usr/bin over from a friends computer? (one of my friends bought their computer[same one as mine] about a month after i got mine) or is that a no go? would that actually solve any thing or just cause more problems?

Nov 21, 2009 10:36 AM in response to ky.belderrain

Wow, that PATH is very different from the one you originally showed us. You have a lot of redundancy there. Without experimenting myself, I suspect that space is related to your problem. You don't know how to find it and remove it? Could be in multiple places, but fixing it depends on what commands work for you, which we don't yet know. Your default PATH is probably set in /etc/profile with customizations in ~/.profile or ~/.bash_profile or ~/.bashrc. Look for the space in the PATH definition and delete it. I'd also get rid of the redundancies you can find: /opt/local/bin, /opt/local/sbin, /usr/local/bin, perhaps others.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal commands not working {clear, pico, etc..}

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.