Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error ethernet excel firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition password problem router slow software sound trojan usb video virus vista windows windows xp wireless
UNIX/Linux
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > UNIX/Linux >
moving bash


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
chucker8's Avatar
Member with 60 posts.
 
Join Date: Jun 2004
Experience: Intermediate
05-Jan-2006, 02: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 379 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
05-Jan-2006, 03: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://linuxphile.org
A lust for linux.
AIM: alustforlinux
chucker8's Avatar
Member with 60 posts.
 
Join Date: Jun 2004
Experience: Intermediate
05-Jan-2006, 04: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 379 posts.
 
Join Date: Mar 2003
Location: MD
Experience: Intermediate
05-Jan-2006, 04:38 PM #4
Yes I believe you will.

Good luck!
Squashman's Avatar
Distinguished Member with 12,689 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
05-Jan-2006, 05: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.
__________________
I hate asking the same question twice!
How to ask questions the smart way!
Microsoft MVP - Windows Shell/User
AGCurry's Avatar
Senior Member with 431 posts.
 
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
06-Jan-2006, 01: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.
Closed Thread

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.


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 help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


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 03:24 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.