LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-16-2015, 12:42 PM   #1
smileybri
LQ Newbie
 
Registered: Oct 2013
Posts: 1

Rep: Reputation: Disabled
Question CLI - FIND command installing software update


So I extract an update to a package that creates one of the folders below and then I run "$(find . -name install.sh)" to find and install the update. It seems to go just fine. How? If the other versions were also there? Which install.sh gets run?

# find -name install.sh
./Program_5.1.8341.5506_Install/install.sh
./Program_5.0.8132.5459_Install/install.sh
./Program_5.2.8724.5567_Install/install.sh
./Program_5.1.8473.5522_Install/install.sh
 
Old 04-16-2015, 12:50 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
whatever one YOU select
 
Old 04-16-2015, 12:51 PM   #3
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
See install script which unpacks and runs.
 
Old 04-16-2015, 02:24 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by smileybri View Post
I run "$(find . -name install.sh)" to find and install the update.
find does not install anything. It does exactly what its name implies, it just finds all files that match the parameters you gave it (-name install.sh) and prints them out.

Quote:
Originally Posted by smileybri View Post
Which install.sh gets run?
None of them.

edit: Actually I see you ran "$(find . -name install.sh)" rather than "find . -name install.sh". In that case it will likely run the first one it finds. You're much better off separating the find and the execution:
Code:
find . -name install.sh
Pick the one you want, and then run it
Code:
./Program_5.2.8724.5567_Install/install.sh

Last edited by suicidaleggroll; 04-16-2015 at 02:29 PM.
 
Old 04-16-2015, 03:27 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by suicidaleggroll View Post
Actually I see you ran "$(find . -name install.sh)" rather than "find . -name install.sh". In that case it will likely run the first one it finds.
It will run the first one it finds, passing all the rest as arguments. Depending on what that script does with its arguments, the result might be "interesting".
 
  


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
[SOLVED] Can confirmation be bypassed in CLI while installing software or upgrading? TristanDee Linux - Newbie 6 03-02-2015 03:12 PM
Cannot authenticate in Software Ctr. or Update Mgr.--CLI is fine, though RobHamm Ubuntu 1 02-28-2011 08:23 PM
Asus Eee PC 2G Surf Unable to update or remove software and find an online manual mattaku no midara Linux - Laptop and Netbook 1 05-06-2010 08:59 PM
Update and installing software problem djib SUSE / openSUSE 3 10-10-2005 05:30 PM
Command to find software version? phlyersphan Linux - Newbie 2 08-02-2004 02:49 PM

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

All times are GMT -5. The time now is 10:34 AM.

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