LinuxQuestions.org
Review your favorite Linux distribution.
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, 01: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, 01:50 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,917

Rep: Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429
whatever one YOU select
 
Old 04-16-2015, 01: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, 03:24 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,282

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
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 03:29 PM.
 
Old 04-16-2015, 04:27 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,046

Rep: Reputation: 1317Reputation: 1317Reputation: 1317Reputation: 1317Reputation: 1317Reputation: 1317Reputation: 1317Reputation: 1317Reputation: 1317Reputation: 1317
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:12 PM
Cannot authenticate in Software Ctr. or Update Mgr.--CLI is fine, though RobHamm Ubuntu 1 02-28-2011 09: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 09:59 PM
Update and installing software problem djib SUSE / openSUSE 3 10-10-2005 06:30 PM
Command to find software version? phlyersphan Linux - Newbie 2 08-02-2004 03:49 PM


All times are GMT -5. The time now is 08:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration