Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash driver drivers error ethernet excel freeze gaming gpu hard drive hardware hdmi internet laptop mac malware memory monitor motherboard music network printer problem ram registry router server slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
moving bash

Reply  
Thread Tools
chucker8's Avatar
Member with 60 posts.
 
Join Date: Jun 2004
Experience: Intermediate
05-Jan-2006, 03:45 PM #1
moving bash
Hi All,
This applies to Solaris 2.6.

I need to move the bash program from /usr/local/bin to /bin.

Is it as simple as just moving the file from one directory to the other? ie

# pwd
/usr/local/bin
#mv bash /bin
#

thanks!
linuxphile's Avatar
Administrator with 429 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
05-Jan-2006, 04:35 PM #2
Why do you need to move bash? Doing this will likely have many unintended consequences. It might be easier/wiser to add /usr/local/bin to the PATH environment variable rather than moving the file. Or at the least create a symbolic link rather than move.

Create a link from /usr/local/bin/bash to /bin/bash with:
ln -s /usrl/local/bin/bash /bin/bash

Added /usr/local/bin to your PATH with:
export PATH=$PATH:/usr/local/bin

The above keeps the current path with the appended /usr/local/bin.
__________________
http://about.me/dmccarthy
chucker8's Avatar
Member with 60 posts.
 
Join Date: Jun 2004
Experience: Intermediate
05-Jan-2006, 05:30 PM #3
thanks for reply!
I had the OS rebuilt. I have many bash scripts which call bash from /bin. If I create the link will I be good to go?

thx
linuxphile's Avatar
Administrator with 429 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
05-Jan-2006, 05:38 PM #4
Yes I believe you will.

Good luck!
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
05-Jan-2006, 06:08 PM #5
I had this happen to me as well once but it was because I moved my website from one provider to another. It had Perl in a different directory so I had to change a lot of perl scripts. I didn't do it manually. Search google for Perl One Liners. It will help you change your path to all your bash scripts very quickly.
AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
06-Jan-2006, 02:29 PM #6
It's almost never a good idea to use absolute path names in scripts. As linuxphile suggests, use your PATH variable to your advantage, and, in this case, make a link to bash in /bin.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 05:06 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.