Eng.mohammad Eng.mohammad - 3 months ago 23
Linux Question

Transfer files between raspberry pi and Multiple Linux OS computers?

I am looking for a method to transfer files between Raspberry Pi and a computer with Linux OS on.
I need to do so without FileZilla file transfer.
I wonder if there is a script to do it automatically .

I have an array of files and a corrosponding array of IP's of the receiving Servers on a network how can i map the files to the servers and send them in turn .

any bit of advice is very much appreciated.


So you need transfers files from Pi to multiple Linux computers. If you only have a limited number of computers you need to transfer to, then you can do so manually for each computer, using the scp command. For example let's say the you need to transfer all files with extension .c found in directory /foo in the Pi to the server named barserver in the directory /foobar. From the Pi you can run:

$ scp /foo/*.c username@barserver:/foobar/

Or equivalently from the server you can run:

$ scp username@piaddress/foo/*.c /foobar/

If you have so many servers that doing it manually would be tedious, then you could write a script.