Solved

.profile on mac

Posted on 2009-07-03
2
335 Views
Last Modified: 2013-11-12
Hi,

I have edited my .profile file in my home directory of Terminal. But have entered an incorrect path.

i.e.

Last login: Fri Jul  3 12:36:45 on console
-bash: export: `directory?]:/usr/local/mysql:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin': not a valid identifier
stephen-mcgowans-macbook-pro:~ stevey_mac2k2$ ls
-bash: ls: command not found
stephen-mcgowans-macbook-pro:~ stevey_mac2k2$ pwd
/Users/stevey_mac2k2
stephen-mcgowans-macbook-pro:~ stevey_mac2k2$ ls
-bash: ls: command not found
stephen-mcgowans-macbook-pro:~ stevey_mac2k2$ cd /
stephen-mcgowans-macbook-pro:/ stevey_mac2k2$ ls
-bash: ls: command not found
stephen-mcgowans-macbook-pro:/ stevey_mac2k2$ suod -s
-bash: suod: command not found
stephen-mcgowans-macbook-pro:/ stevey_mac2k2$ ls
-bash: ls: command not found
stephen-mcgowans-macbook-pro:/ stevey_mac2k2$ sudo -s
-bash: sudo: command not found
stephen-mcgowans-macbook-pro:/ stevey_mac2k2$ pico .profile
-bash: pico: command not found

Is there any way of getting into .profile and editing it?

Also if i want to change $PATH to usr/local/mysql how would i go about this... as i have done it incorrectly the first time round.

My echo $PATH currently reads:
/usr/local/mysql



Thanks.


0
Comment
Question by:StephenMcGowan
2 Comments
 

Author Comment

by:StephenMcGowan
Comment Utility
Since then i've found that the command line:

stephen-mcgowans-macbook-pro:~ stevey_mac2k2$ export PATH=/usr/local/mysql:$PATH

does not come back with "command not found"

i've tried fixing the path in my command line to bring back my commands, but the directory above doesn't seem to be working.

i have also tried lines such as:

stephen-mcgowans-macbook-pro:~ stevey_mac2k2$ export PATH=/usr/local/mysql:
stephen-mcgowans-macbook-pro:~ stevey_mac2k2$ export PATH=/usr/local/mysql

but to no avail.

Is there any way of me retrieving my unix commands back in Terminal?

thanks.

0
 
LVL 53

Accepted Solution

by:
strung earned 500 total points
Comment Utility
If you drag and drop a folder into the terminal window it should return the path name.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

The error "There was an error performing the update" occurred on a Mac OS X client workstation running  Symantec AntiVirus for Mac (http://www.symantec.com/business/products/purchasing.jsp?pcid=pcat_security&pvid=825_1) - the Enterprise product vers…
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now