Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-20-2009, 07:22 AM
|
#1
|
LQ Newbie
Registered: Nov 2009
Posts: 8
Rep:
|
vi command not found - mac terminal
Hi guys,
I'm completely new to linux and was trying to setup my vi .profile ... and I think I might have linked it wrong.
The thing is, now I'm trying to get in to change it, and I can't get back into it. I used the command vi. profile again, but this time around, I get the error
-bash: vi: command not found
After I typed echo $PATH, the following showed up
/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5/bin:/Applications/MAMP/htdocs/cake_1_2/cake/console/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
Is there something wrong with the path? How can I fix my problem?
Thanks!!
|
|
|
11-20-2009, 07:35 AM
|
#2
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
looks to me like /usr/bin is missing from your path
Set your path with:
Code:
export PATH=$PATH:/usr/bin
then load vi, edit your profile and remember to put /usr/bin into your path permanently.
|
|
|
11-20-2009, 07:50 AM
|
#3
|
LQ Newbie
Registered: Nov 2009
Posts: 8
Original Poster
Rep:
|
Tried it and ...
Tried what you said but I'm getting the following msg. I'm afraid I'll mess up my computer so I apologize in advance for the silly questions
what exactly does it mean?
i typed ...
export PATH=$PATH:/usr/bin
vi .profile
it returned ...
E325: ATTENTION
Found a swap file by the name ".profile.swp"
While opening file ".profile"
dated: Fri Nov 20 00:27:46 2009
NEWER than swap file!
(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r .profile"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".profile.swp"
to avoid this message.
Swap file ".profile.swp" already exists!
|
|
|
11-20-2009, 07:59 AM
|
#4
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
Just means you either crashed out of vi (or another editor) last time while editing the file and a swap (temporary) file has been left behind.
Do this:
Code:
mv .profile.swp .profile.bak
which will rename the swap file just in case we need it (which I severely doubt, but just to be sure) then redo my previous instructions.
|
|
|
11-20-2009, 08:18 AM
|
#5
|
LQ Newbie
Registered: Nov 2009
Posts: 8
Original Poster
Rep:
|
You're awesome! It's showing up now, but I can't edit it. What command should I use?
|
|
|
11-20-2009, 08:21 AM
|
#6
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
Can't edit it why? It's saying it's read only or something? Or do you mean you're not familiar with vi?
If it's the latter, you need to press 'i' to put it into insert mode. Then to save and quit, press escape and type
:wq
|
|
|
11-20-2009, 08:31 AM
|
#7
|
LQ Newbie
Registered: Nov 2009
Posts: 8
Original Poster
Rep:
|
Yes I"m a complete noob. That solves it, thanks!
I'm trying to link bake actually, part of the features of cakePHP. mySQL is linked properly.
Something is wrong with my cake link ... if you can advise, please feel free
entered:
cd /Applications/MAMP/htdocs/
htdocs Sam$ cake bake testsite
returns:
-bash: cake: command not found
|
|
|
11-20-2009, 08:34 AM
|
#8
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
"cake: command not found" means the system cannot find the file 'cake' in the path. Do you know where this 'cake' file is located?
|
|
|
11-20-2009, 08:38 AM
|
#9
|
LQ Newbie
Registered: Nov 2009
Posts: 8
Original Poster
Rep:
|
cake is located in the folder
/Applications/MAMP/htdocs/cake/cake/console
|
|
|
11-20-2009, 08:39 AM
|
#10
|
LQ Newbie
Registered: Nov 2009
Posts: 8
Original Poster
Rep:
|
by the way, i renamed the path to PATH=/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5/bin:/Applications/MAMP/htdocs/cake/cake/console$PATH
|
|
|
11-20-2009, 08:43 AM
|
#11
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
You need a : before that last $PATH
That might actually be the problem. Should read:
Code:
PATH=/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5/bin:/Applications/MAMP/htdocs/cake/cake/console:$PATH
|
|
|
11-20-2009, 08:55 AM
|
#12
|
LQ Newbie
Registered: Nov 2009
Posts: 8
Original Poster
Rep:
|
thanks! genius! cheers ...
|
|
|
11-20-2009, 09:03 AM
|
#13
|
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938
Rep:
|
No problem
|
|
|
All times are GMT -5. The time now is 07:01 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|