Is it possible to copy one file to multiple computers
Dear All,
Is it possible to copy one file to multiple computers with single line command ? I generally use rcp command to copy from one computer to another computer. example: rcp localfile host1:/home/kb/ now i would ilke to copy the local file to different host's. so i tried in the following way, but this doesnt work rcp localfile host1:/home/kb/ host2:/home/kb any suggestions would beuseful to me please help me. regards Karthick |
You can use a shell script loop to do copy in serial or parallel.
|
how can i loop them
but how can i loop them, do u have any examples?
|
normally my response would be show your work and we will help with corrections but this is simple enough it doesnt warrant the effort of my usual lecture (... too late):
Code:
scp test.lq user1@ip1:/whatever/floats/your/boat & |
Since the folders i copy are on the range of 1-2 GB data, so it takes time for the first one to finish and execute the second time.
I wanted to try opening two terminal and execute at the same time, i have not tried this option because i am not sure how does the data gets distributed in copying at two different locations. if opening in two terminal works, i am also happy as long as i don't loose the data. |
the ampersand (&) makes it a background process so they both fly at the same time.
|
good to know, thank you so much. Now it sounds really silly.
Thanks for all to realize this. |
All times are GMT -5. The time now is 03:41 AM. |