New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

How to edit PATH variable outside of terminal


Post Reply New Thread Subscribe

 
Thread Tools
oxy126

 
Member Since: Apr 20, 2011
Posts: 2
oxy126 is on a distinguished road

oxy126 is offline
I'm wondering if there's any possible way to edit my PATH variable outside of terminal. I sorta messed around with /usr/bin, and now I can't copy or move the backups I made of it back in to replace them, since it can't run the correct commands.
QUOTE Thanks
gsahli

 
Member Since: Dec 11, 2010
Posts: 1,155
gsahli is a jewel in the roughgsahli is a jewel in the roughgsahli is a jewel in the rough

gsahli is offline
I think you need to reinstall OS X - who knows what else you've messed up?

You can edit ~/.profile to set up the PATH variable.
QUOTE Thanks
Discerptor

 
Discerptor's Avatar
 
Member Since: Aug 02, 2005
Posts: 1,229
Discerptor is a name known to allDiscerptor is a name known to allDiscerptor is a name known to allDiscerptor is a name known to allDiscerptor is a name known to allDiscerptor is a name known to allDiscerptor is a name known to all
Mac Specs: 2.6GHz Core i7 15" MacBook Pro - 8GB DDR3 SDRAM - 750GB 7200 RPM HDD - GeForce 650M GT 1GB VRAM

Discerptor is offline
You should still be able to move the backups you made back in using Finder, even if you've messed up your command line tools. Remember that you can use Go -> Go To Folder... in Finder to go to any folder on your system, even if it's hidden. All that said, if you're going to mess around with putting your own command line commands in OS X, in the future, you should just make some other directory for them and add it to your PATH. I normally just laugh at people who've messed up in the way you claim to have.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,352
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
You may not need to reinstall anything - it's very possible we can fix this.

You can still run commands - you'll just need to use the full path to the binaries. For instance, instead of running "cp", run "/bin/cp". You can find binaries by executing "/usr/bin/whereis <name of bin>". For instance, you can execute "/usr/bin/whereis mv" and it will print back the location of mv.

Now that you have the full path of apps, execute the commands you need. And as a tip for the future (and something you're probably well aware of now) - don't mess around with parts of the filesystem that you shouldn't be modifying.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
oxy126

 
Member Since: Apr 20, 2011
Posts: 2
oxy126 is on a distinguished road

oxy126 is offline
Thanks all . Sorta learned my lesson there. Also I found that under /etc you can modify paths.d as a text file. Problem was, I wasn't logged in as root, so I couldn't modify them, and once I shut down the computer, it wouldn't reboot, so I had to reinstall it. And that's why you don't mess with /bin files....
QUOTE Thanks

Post Reply New Thread Subscribe


« Changing Keyboard Functionality | Leopard and Xcode on G4? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
help using terminal aaron4osu OS X - Development and Darwin 2 10-28-2010 10:33 PM
edit XML file using variable in shell script. jc6 OS X - Development and Darwin 1 10-23-2010 07:36 PM
Network path to windows machine on network jdmcm Internet, Networking, and Wireless 0 11-12-2008 02:43 PM
C++ in terminal frike OS X - Development and Darwin 2 04-04-2008 11:52 AM
Terminal Help rs2sensen OS X - Apps and Games 1 04-25-2005 11:52 PM

All times are GMT -4. The time now is 03:01 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?