O'Reilly logo

Unix in a Nutshell, 4th Edition by Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

rsync

Synopsis

    rsync [options] source ...dest

rsync synchronizes files across a network connection. It is particularly good for high-latency connections, and for synchronizing entire directory trees across machines. On Solaris, rsync is in /opt/sfw/bin; it may not be installed on your system. However, you can download it and compile and install it. This entry documents rsync 2.6.5, which is the most recent as of the time of this writing.

URL: http://rsync.samba.org/.

Source and destination specifications take three forms:

Pathname

A regular Unix pathname, representing a local file.

[user@]host:[path]

The file or directory path on remote host host as remote user user. With a single colon, rsync uses a remote shell such as ssh or rsh for its transfer mechanism. The remote username is optional, and the remote path defaults to the current users's home directory on the remote system. A relative path (one that does not start with /) is relative to the home directory on the remote system.

[user@]host::[path]

The file or directory path on remote host host as remote user user. With a double colon, rsync makes a direct TCP connection to port 873 on the remote machine, and expects to talk to another copy of rsync running in daemon mode.

If both source and destination are local pathnames, rsync synchronizes the two local files or directory trees. You may not specify a remote source together with a remote destination.

Using a trailing / on a directory name causes rsync to work on the contents of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required