Home > UNIX > File Transfers in UNIX

File Transfers in UNIX

Connect to a remote machine thru ssh:
$ ssh username@hostname

Download remote file using rsync:
$ rsync -v -e ssh username@hostname:~/path_to_file.txt /destination_folder

Upload file from a local computer to a remote server:
$ rsync -v -e ssh /path_to_file.txt username@hostname:~/destination_folder

Download remote folder using rsync:
$ rsync -r -v -e ssh username@hostname:~/path_to_folder /destination_folder

Synchronize a local directory with a remote directory:
$ rsync -r -a -v -e “ssh -l username” –delete hostname:/remote_dir/ /local_dir

Synchronize a remote directory with a local directory:
$ rsync -r -a -v -e “ssh -l username” –delete /local_dir hostname:/remote_dir

Advertisement
Categories: UNIX Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.