KevsRobots Learning Platform
52% Percent Complete
By Kevin McAleer, 2 Minutes

Transferring files over a network is a common task, especially when working with multiple devices. In this lesson, youβll learn how to securely transfer files between machines using scp and rsync.
scp.rsync for efficient file transfers and synchronization.scpThe scp (secure copy) command is used to transfer files between two machines over a secure connection. For example, to copy a file from your Raspberry Pi to another machine:
scp example.txt [email protected]:/home/pi/
To copy a file from another machine to your Raspberry Pi:
scp [email protected]:/home/pi/example.txt /home/pi/
The rsync command is a powerful tool for efficiently transferring and synchronizing files between machines. It only transfers the differences between the source and the destination, making it faster than scp for large directories.
rsync -avh /home/pi/Projects/ [email protected]:/home/pi/Projects/
The -avh flags stand for archive mode, verbose output, and human-readable output, respectively.
In this lesson, you learned how to securely transfer files between machines using scp and rsync. These tools are essential for managing files across multiple devices, especially in networked environments.
You can use the arrows β β on your keyboard to navigate between lessons.
Comments