O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

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 destination

Transfers files from source to destination. rsync is a synchronization system that uses checksums to determine differences (instead of relying on modification dates) and does partial file transfers (transferring only the differences instead of the entire files).

rsync can use a remote shell (rsh by default) as a transport, in which case the remote host must have rsync installed as well. You can use a remote shell like ssh instead of the default by specifying that in options.

You can also use rsync without a remote shell, in which case rsync requires that the remote host run an rsync server daemon. For details on the advanced features of rsync, including running an rsync server, refer to rsync's manpage. The following descriptions and examples cover rsync's basic operation.

rsync doesn't preserve resource forks or HFS metadata when copying files that contain them.

The rsync source and destination arguments can be specified in several ways, as shown in Table 2-7.

Table 2-7. rsync source and destination arguments

Source

Destination

Description

a Uses a remote shell as the transport and requires rsync on the remote host.

b Doesn't use a remote shell but requires an rsync server running on the remote host. Note the double colons (::), except for the URL format.

srcpath [...]

[user@]host:destpath

Transfer local directory srcpath to remote directory destpath. a

[user@]host: srcpath

destpath

Transfer remote directory srcpath ...

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