HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)
r
rdist(1) rdist(1)
The except_pat command is like the except
command except that pattern_list is a list of
regular expressions (see ed(1) for details). If one of the patterns matches some string within a
file name, that file will be ignored. Note that since the backslash (
\) is a quote character, it
must be doubled to become part of the regular expression. Variables are expanded in
pattern_list but not shell file pattern matching characters. To include a
$, it must be escaped
with the backslash.
The
special command is used to specify sh(1) commands that are to be executed on the
remote host after the file in name_list is updated or installed. If the name_list is omitted then
the shell commands will be executed for every file updated or installed. The shell variable ‘FILE’
is set to the current filename before executing the commands in string. string starts and ends
with double quotes (") and can cross multiple lines in distfile. Multiple commands to the shell
should be separated by semi-colons (
;
). Commands are executed in the user’s home directory on
the host being updated. The
special command can be used, for example, to rebuild private
databases after a program has been updated. Shell variables cannot be used in the command
because there is no escape mechanism for the
$ character.
Newlines, tabs, and blanks are only used as separators and are otherwise ignored. Comments begin with
#
and end with a newline.
A generalized way of dynamically building variable lists is provided by using a backquote syntax much like
the shell. In this way, arbitrary commands that generate stdout with space-separated words may be used
to build the list (see the use of
cat command in the examples).
Variables to be expanded begin with $ followed by the variable name enclosed in curly braces.
The shell meta-characters
[, ], {, }, *, and ? are recognized and expanded (on the local host only) in the
same way as csh(1). They can be escaped with a backslash. The
˜ character is also expanded in the same
way as csh but is expanded separately on the local and destination hosts. When the -w
option is used with
a file name that begins with
˜, everything except the home directory is appended to the destination name.
File names which do not begin with / or ˜ use the destination user’s home directory as the root directory
for the rest of the file name.
Note
While transferring files using rdist, if the destination is an NFS-mounted directory, you need to ensure
you have appropriate access permission in the NFS configuration.
DIAGNOSTICS
A complaint about mismatch of rdist version numbers may mean that an executable rdist is not in
the shell’s path on the remote system.
EXAMPLES
The following is a small example.
HOSTS = ( matisse root@arpa )
FILES = ( /usr/lib /usr/bin /usr/local/games
/usr/include/{*.h,{sys,rpc*,arpa}/*.h}
/usr/man/man? ‘cat ./std-files‘ )
EXLIB = ( Mail.rc aliases aliases.dir aliases.pag crontab dshrc
sendmail.cf sendmail.fc sendmail.hf sendmail.st uucp vfont )
${FILES} -> ${HOSTS}
install -R ;
except /usr/lib/${EXLIB} ;
except /usr/local/games/lib ;
special /usr/sbin/sendmail " /usr/sbin/sendmail -bz" ;
srcs:
/usr/local/src -> arpa
except_pat ( \\.o$ /SCCS\$ ) ;
IMAGEN = (ips dviimp catdvi)
imagen:
HP-UX 11i Version 1: September 2005 − 3 − Hewlett-Packard Company Section 1−−817