LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-05-2013, 05:08 AM   #1
reza_zah1991
Member
 
Registered: Mar 2013
Location: Qom , Iran
Distribution: opensuse,lubuntu
Posts: 32

Rep: Reputation: Disabled
Thumbs down Like Cloud Computing with shellScript


hi folk,,
i have a questions,,

i hava machine A & B,,

1- i want to A send Path(like /home/) to the B machine & B send back the Content Of it's Path (for example machine B /home/ Content) to A,,

2- After that machine A download a one text file from B File System(from content of /home/) & edit that & send it back to the B,, & machine B Replace the recived File with old File,,

3- At Last machine A can call the shellScript File(or Command) in machine B & machine B return ONLY the Result of that to A,,

tnx
 
Old 12-05-2013, 06:15 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Use ssh and some bash for this.

This is a rough outline.
Code:
ssh user@machineB ls /path/to/dir > /tmp/filelist
editor /tmp/filelist
#scp /tmp/filelist user@machineB:~/filelist
for i in $(cat /tmp/filelist); do
      scp user@machineB:/path/to/dir/$i ./
done
You would use ssh to connect to machineB and do a listing (ls) of the directory. The output gets redirected to /tmp/filelist
Then you edit the filelist and only leave files you want to copy to machineA.
Then loop through this file and copy the files from machineB to machineA in the current working directory (pwd).
 
  


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
cloud computing pravin shinde Linux - Virtualization and Cloud 3 08-18-2013 10:11 PM
Cloud computing servers PhillipHuang Linux - General 6 03-07-2011 04:03 AM
Cloud computing vs. ssh ufmale General 5 10-07-2009 08:19 PM
LXer: Cloud computing versus Grid computing LXer Syndicated Linux News 0 03-05-2009 02:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:52 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