Solved

.profile on mac

Posted on 2009-07-03
2
355 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:StephenMcGowan
ID: 24772173
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
ID: 24772772
If you drag and drop a folder into the terminal window it should return the path name.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 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