ditto replicates the
source directory hierarchy to the
destination directory hierarchy. Both
source and
destination may be of the form [
user@][
host:][
directory]. At least one of
host: or
directory
must be specified. The current user is used if
user@ is omitted, the local host is used if
host: is omitted, and
the user home directory is used if
directory is omitted.
Remote hosts and files are accessed via ssh(1) or
rsh(1). ksh(1),
pax(1), and tw(1) must be
installed on the local and remote hosts.
For each source file ditto does one of these actions:
- chmod|chown
change the mode and/or ownership of the destination file to match the source
- copy
- copy the source file to the destination
- delete
delete the destination file
- skip
- the destination file is not changed
The source and destination hierarchies are generated by
tw(1) with the
--logical
option. An
--expr option may be specified to prune the search. The
tw searches are relative to the
source
and
destination directories.