HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)

r
rdist(1) rdist(1)
NAME
rdist - remote file distribution program
SYNOPSIS
rdist [ -bhinqvwyMR ][-f
distfile ][-d var=value ][-m host ][label... ]
rdist [ -bhinqvwyMR ] -c name... [ login@]host[:dest ]
DESCRIPTION
rdist facilitates the maintaining of identical copies of files over multiple hosts. It preserves the owner,
group, mode, and modification time of files if possible and can update programs that are executing.
-f distfile Specify a distfile for
rdist to execute. distfile contains a sequence of entries that specify the
files to be copied, the destination hosts, and what operations to perform to do the updating.
The format of distfile is described in detail later. If distfile is
-, the standard input is used. If
no
-f option is present, the program looks first for a file called
distfile, then Distfile
in the local host’s working directory to use as the input.
-d var=value
Define var to have value. The -d option is used to define variable definitions in the distfile.
value can be an empty string, one name, or a list of name separated by tabs and/or spaces and
enclosed by a pair of parentheses. However, if the variable specified is already defined in the
distfile, the
-d option has no effect (because the distfile overrides the
-d option).
-m host Limit which machines are to be updated. Multiple -m arguments can be given to limit
updates to a subset of hosts that are listed in the distfile.
label Label of a command to execute. The label must be defined in distfile.
-c name... The -c option forces rdist to interpret the remaining arguments as a small distfile. The
equivalent distfile is as follows.
( name ... ) -> [login@]host
install [dest];
Note: In IPv6 enabled systems to use the -c option with an IPv6 address, the IPv6 address
has to be enclosed in a square bracket pair ([ and ]). An example invocation of
rdist with
the
-c option and an IPv6 address is as shown below:
rdist -c name user@[IPv6 address]:dest
rdist
will exit with an error message if the IPv6 address is not enclosed within square brack-
ets.
-n Print the commands without executing them. This option is useful for debugging distfile.
-q Quiet mode. Files that are being modified are normally printed on standard output. The -q
option suppresses this.
-R Remove extraneous files. If a directory is being updated, any files that exist on the remote host
that do not exist in the master directory are removed. This is useful for maintaining truly
identical copies of directories.
-h Follow symbolic links. Copy the file that the link points to rather than the link itself.
-i Ignore unresolved links. rdist will normally try to maintain the link structure of files
being transferred and warn the user if it cannot find all the links.
-v Verify that the files are up to date on all the hosts. Any files that are out of date will be
displayed but no files will be changed nor any mail sent.
-w Whole mode. The whole file name is appended to the destination directory name. Normally,
only the last component of a name is used when renaming files. This will preserve the direc-
tory structure of the files being copied instead of flattening the directory structure. For exam-
ple, renaming a list of files such as (dir1/f1 and dir2/f2)to dir3 would create files
dir3/dir1/f1 and dir3/dir2/f2 instead of dir3/f1 and dir3/f2.
-y Younger mode. Files are normally updated if their mtime and size (see stat(2)) disagree. The
-y option causes rdist not to update files that are younger than the master copy. This can
be used to prevent newer copies on other hosts from being replaced. A warning message is
printed for files which are newer than the master copy.
HP-UX 11i Version 1: September 2005 1 Hewlett-Packard Company Section 1815