LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-08-2007, 02:09 PM   #1
yogaboy
Member
 
Registered: Oct 2004
Location: Londinium
Distribution: CentOs 4, OSX Tiger
Posts: 93

Rep: Reputation: 15
Executables - possible to mv?


Hi,

just updated rsync and was a bit slack so installed it into /usr/local/bin when I wanted to put it in /usr/sbin/.

Since it's only once executable file, can I just mv it instead of removing and re-installing?

Is this the same for all Linux exe's?? I know you can do something similar on OSX but not tried it before on Linux.
 
Old 02-08-2007, 02:24 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
yogaboy, better to create a symlink called 'rsync' in /usr/sbin which points to the program where it lives.
 
Old 02-08-2007, 02:29 PM   #3
yogaboy
Member
 
Registered: Oct 2004
Location: Londinium
Distribution: CentOs 4, OSX Tiger
Posts: 93

Original Poster
Rep: Reputation: 15
ok, thanks. I updated via the source because the rsync version on yum was too old. If I use yum to install rsync in future will I have to remove the symlink, or will yum take care of that?

Sorry if I'm being stupid, but I suppose my stupidity is helping me learn things!
 
Old 02-08-2007, 02:36 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Actually, I don't think installing the package will affect your symlink at all. Except: your symlink may no longer point to where you want it to; and if yum wants to install the program in the place where the symlink lives, my guess is it will clobber the symlink.
 
Old 02-08-2007, 03:05 PM   #5
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Having the same program installed in multiple places is not directly a problem, but odds are good at some point the multiple locations will cause problems. For example, if you have the true executable in /usr/local/bin, and have it symlinked to /usr/sbin, that's no problem. If you use yum to install rsync, I think it should live in /usr/bin/rsync. That at least is where Debian places it by default. I avoid rpm distros, so they may place it elsewhere. In any case, what will become an issue is if you just type rsync at the CLI, which rsync are you getting?

if you do
Code:
echo $PATH
you'll get a list of all the places your user looks for executable programs, and it looks in the order it prints. For example, here's mine:

Code:
jim@jimsworktop:~/installs$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
So my machine will first check /usr/local/bin for rsync, then /usr/bin, then /bin etc. If you have the same order, and have rsync in /usr/local/bin, then there is never any need to let yum install rsync, as it will never use it. Once it hits your rsync in /usr/local/bin, it will use that, and stop looking. You can use the full path, ie /usr/bin/rsync if you want that version.

Generally, mixing executables is more trouble than it is worth. I'd stick to the one you have, then uninstall it if you let yum install another.

That being said, I run multiple versions of the game wesnoth on my laptop. I compile the latest version daily, and it lives in /usr/local/bin, so if I type wesnoth, I get the latest and greatest. If I find a problem with that, then I call /usr/games/wesnoth, and get the version installed and kept up to date (not ahead of date) by Debian. It comes down to being specific.

Peace,
JimBass

Last edited by JimBass; 02-08-2007 at 03:06 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Executables dudeman41465 Linux - Software 4 10-09-2005 07:59 PM
executables humblestudent87 Linux - Newbie 6 07-22-2004 11:42 AM
Executables q64 Linux - Newbie 3 03-29-2004 03:31 AM
Help on executables.... Kit Linux - General 9 12-06-2002 11:24 AM
Where are the executables? rooman Linux - Software 6 06-05-2002 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration