0

I have 2 Raspberry Pi's. I want to transfer files from my first Raspberry Pi to my second Raspberry Pi any guides my masters :)? sorry for the consecutive questions I'm just new to Raspberry Pi.

P.S My two Raspberry Pi's are different. One is the first version while the other is second, is that okay?

1
  • Could you please be a little more specific? This is a very generic question (and not very specific to the Pi either). Please note that there are also 179 hits to this search. Have you checked any of those (as we try to avoid duplicates)?
    – Ghanima
    Mar 6, 2016 at 11:40

2 Answers 2

1

If you have a file '/home/pi/Desktop/hello.txt' on 'raspberry1' and you wish to transfer it to 'raspberry2':

  1. On 'raspberry1' : bring up a terminal.
  2. Change into the directory where you file 'hello.txt' resides:
  3. Startup an 'sftp' session to 'raspberry2'.
  4. Within the 'sftp' session, change into the directory where you want to copy the file.
  5. Issue a 'put' command, exit when done.

So that would be:

cd /home/pi/Desktop
sftp raspberry2

Then you would enter your login credentials for 'raspberry2', and then in 'sftp':

cd /tmp # or whatever directory you want
put hello.txt
quit

You can copy multiple files using the 'sftp' command 'mput'. You can setup automatic logins between the two machines as well if need be. You can 'batch' up 'sftp' commands so you can run them automatically.

0
0

It depends on what you want to transfer.

rsync as it implies can synchronise directories (including whole filesystems).

ssh is the most common protocol for accessing another system and the related scp lets you copy files.

ftp is the time honoured method for file transfer and FileZilla is a GUI ftp client.

There are a number of networking protocols which you can use to transfer from the GUI.

3
  • Thank you for the quick reply! I just want to transfer docs and videos from my Raspberry Pi1 that is connected via wireless lan to my Raspberry Pi2 that is connected via router. Can you share me some codes that could make this possible? Again thank you so much. Mar 6, 2016 at 11:10
  • @LorenzGarcia ftp is probably easiest and most reliable. There is no "code". Another user has pasted an example. I would suggest you install FileZilla on either (or both) Pi, which lets you visually select files.
    – Milliways
    Mar 6, 2016 at 22:02
  • 1
    sftp with filezilla would be much better choice as sftp doesn't require you to install anything
    – rav_kr
    Mar 19, 2016 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.