
rsync | 391
Linux
Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
rsync
rsync [options] sources dest
Transfer files; used frequently for updating files across a network.
File transfer with rsync is fast and efficient because it checks local
files against remote files in small chunks, or blocks, and transfers
only the blocks that differ between the files.
sources and the final dest are in the form of:
user@host:port/filename
If the file is on the local host, a plain filename can be specified. If
the file is on a remote host, the host must also be specified. user can
optionally be specified to log in as a different user on the remote
site (in which case a password prompt might appear) and port can
optionally be specified with a remote host to make rsync use a TCP
port other than its default, 873.
Relative filenames (names without initial slashes) are handled rela-
tive to the user’s home directory. If a source directory is listed with
a trailing slash, the whole directory is transferred and will appear
under the destination directory; if the directory is listed without the
slash, its files and subdirectories will appear directly under the
destination directory. Normally, regular directories and files are
transferred, but not symbolic links or other special files such as
sockets and FIFOs.
Two other formats for sources and dest, which ...