Peter
Before I start moving files around I'd like to be able to look at my directories.
I haven't yet asked you to move any files around, just to look to see which file is messing up your path.
I go away tomorrow for a week. You can take my advice or not.
Open the Terminal (from /Applications/Utilities) and
copy and paste the following into the Terminal window followed by a return:
export PATH="${HOME}/${MACHTYPE}/bin:${HOME}/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbi n:/sbin"
Now try using
ls or any of the other commands: magic isn't it?
You should now be able to run
sudo periodic daily weekly monthly
(and supply your password) to run all your maintenance tasks. Note the password is
not echoed, you must type it blind, followed by a return.
OK so far, but the minute you quit Terminal you will lose that nice path that let's you do this stuff, and you don't want to type that every time, do you?
So I prepared these instructions for you in advance. I really wanted to see which of your files had got the wrong entry, and discover
how that had happened, but no time for that now.
We'll set up a decent
.bash_profile and
.bashrc for you. You will need both, since I have arranged for
.bash_profile to source
.bashrc. That way you will have the same environment in all your Terminal windows.
Note some of this will involve secondary prompts, e.g. '
>' which you
don't type or copy; just the stuff in black.
Open the Terminal (from /Applications/Utilities) and
copy and paste the following into the Terminal window,
one line at a time, with a return after each line:
/bin/cat >| ~/.bashrc <<END
>export PATH="${HOME}/${MACHTYPE}/bin:${HOME}/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbi n:/sbin"
>export MANPATH="${HOME}/man:/usr/local/share/man:/usr/share/man"
>END
/bin/cat >| ~/.bash_profile <<END
>if [ -r ~/.bashrc ]; then
> . ~/.bashrc
>fi
>END
You will need to quit Terminal and restart it for this to take effect. Then all the standard commands will be available without you needing to specify the complete path.
There. Don't forget to
copy and paste all of that, because the shell is very picky about this stuff and will not tolerate errors.