-
- ditto - replicate directory hierarchies
-
- ditto [ options ] source destination
-
- 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 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.
-
- -c, --checksum
- Copy if the tw(1) 32x4 checksum mismatches.
- -d, --delete
- Delete destination files that are not in the source.
- -e, --expr=tw-expression
- tw(1) select expression.
- -m, --mode
- Preserve file mode. On by default; -m means --nomode.
- -n, --show
- Show the operations but do not exectute.
- -o, --owner
- Preserve file user and group ownership.
- -p, --physical
- Generate source and destination hierarchies by tw(1) with the --physical
option.
- -r, --remote=protocol
- The remote access protocol; either rsh or ssh. The default value is rsh.
- -u, --update
- Copy only if the source file is newer than the destination file.
- -v, --verbose
- Trace the operations as they are executed.
- -D, --debug
- Enable the debug trace.
-
- rdist(1), rsync(1), rsh(1),
tw(1)
-
- version
- ditto (AT&T Labs Research) 2003-01-16
- author
- Glenn Fowler <gsf@research.att.com>
- author
- ek
- copyright
- Copyright © 2001-2008 AT&T
- license
- http://www.opensource.org/licenses/cpl1.0.txt