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 the following table.

Source

Destination

Description

srcpath [...]

[user@]host:destpath

Transfer local directory srcpath to remote directory destpath.a

[user@]host: srcpath

destpath

Transfer remote directory srcpath to local directory destpath.a

[user@]host:srcpath

List contents of srcpath without transferring anything.a

srcpath [...]

[user@]host::destpath

Transfer local directory srcpath to remote directory destpath. b

[user@]host::srcpath

[destpath]

Transfer remote ...

Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.