File Transfer

  • Use the command line shell to fransfer files.

Commands

scp

  • scp - secure file/dir copy using encrypted SSH protocol

# Copy file from a local pc to a remote pc
scp file.txt 192.168.1.50:/home/user/
# scp Source_path Destination_path

# Copy a directory and its contents
scp -r files 192.168.1.50:/home/user/
# "files" is a directory

# Copy file from remote
scp 192.168.1.50:/home/user/remote-file.txt /home/user/

# Use a remote user
scp file.txt [email protected]:/home/user2/
file.txt     100%    8     1.9KB/s   00:00

rsync

  • rsync - fast and versatile file-copying tool for synchronizing files and directories between two locations over a remote shell (or local)

    • it is widely used for backups and mirroring

    • it sends only the differences between the source files and the existing files in the destination.


Last updated

Was this helpful?