View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 3 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Sep 15, 2010 8:18 pm 
Offline
Joined: Sun Aug 28, 2005 7:07 pm
Posts: 821
Location: Melbourne, Australia
I'd use something like this:

Code:
for i in host1 host2 host3 host4;do echo -n $i && ssh $i locate myfile;done


Mike

EDIT: I'd also have ssh keys set up so I didn't have to type in a password


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 15, 2010 9:35 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
To run it simultaneously the command would have to background each ssh process as it was launched and then wait for them all at the end... Of course if you're doing that, you'd also need some way to tell which machine the interleaved output is coming from.

Mike's serial solution is a good compromise. Since it uses locate the results from each machine should be fast and the output for it will be contiguous.


Top
 Profile  
 
PostPosted: Thu Dec 18, 2014 10:31 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
The original post was a spammer that copy and pasted the question from a Linux forum
http://www.linuxforums.org/forum/newbie ... ously.html

_________________
My System


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu