Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.profile on mac

Posted on 2009-07-03
2
Medium Priority
?
357 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 2000 total points
ID: 24772772
If you drag and drop a folder into the terminal window it should return the path name.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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 …
Article by: Justin
In light of the WannaCry ransomware attack that affected millions of Windows machines, you might wonder if your Mac needs protecting. Yes, it does and here is how to do it.
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 …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

722 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