Annotation of 43BSDTahoe/man/man1/rdist.1, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1985 Regents of the University of California.
                      2: .\" All rights reserved.  The Berkeley software License Agreement
                      3: .\" specifies the terms and conditions for redistribution.
                      4: .\"
                      5: .\"    @(#)rdist.1     6.6 (Berkeley) 5/13/86
                      6: .\"
                      7: .TH RDIST 1 "May 13, 1986"
                      8: .UC 6
                      9: .ad
                     10: .SH NAME
                     11: rdist \- remote file distribution program
                     12: .SH SYNOPSIS
                     13: .B rdist
                     14: [ \-nqbRhivwy ]
                     15: [ \-f distfile ] [ \-d var=value ] [ \-m host ]
                     16: [ name ... ]
                     17: .PP
                     18: .B rdist
                     19: [ \-nqbRhivwy ] -c name ... [login@]host[:dest]
                     20: .SH DESCRIPTION
                     21: .I Rdist
                     22: is a program to maintain identical copies of files over multiple hosts. 
                     23: It preserves the owner, group, mode, and mtime of files if possible and
                     24: can update programs that are executing.
                     25: .I Rdist
                     26: reads commands from
                     27: .I distfile
                     28: to direct the updating of files and/or directories.
                     29: If
                     30: .I distfile
                     31: is `\-', the standard input is used.
                     32: If no
                     33: .B \-f
                     34: option is present, the program looks first for `distfile',
                     35: then `Distfile' to use as the input.
                     36: If no names are specified on the command line,
                     37: .I rdist
                     38: will update all of the files and directories listed in
                     39: .IR distfile .
                     40: Otherwise, the argument is taken to be the name of a file to be updated
                     41: or the label of a command to execute. If label and file names conflict,
                     42: it is assumed to be a label.
                     43: These may be used together to update specific files
                     44: using specific commands.
                     45: .PP
                     46: The
                     47: .B \-c
                     48: option forces
                     49: .I rdist
                     50: to interpret the remaining arguments as a small
                     51: .IR distfile .
                     52: The equivalent distfile is as follows.
                     53: .nf
                     54: 
                     55: .ti +.5i
                     56: ( \fIname\fP ... ) -> [\fIlogin\fP@]\fIhost\fP
                     57: .ti +1i
                     58: install        [\fIdest\fP] ;
                     59: 
                     60: .fi
                     61: .PP
                     62: Other options:
                     63: .TP
                     64: .B \-d
                     65: Define
                     66: .I var
                     67: to have
                     68: .IR value .
                     69: The
                     70: .B \-d
                     71: option is used to define or override variable definitions in the
                     72: .IR distfile .
                     73: .I Value
                     74: can be the empty string, one name, or a list of names surrounded by
                     75: parentheses and separated by tabs and/or spaces.
                     76: .TP
                     77: .B \-m
                     78: Limit which machines are to be updated. Multiple
                     79: .B -m
                     80: arguments can be given to limit updates to a subset of the hosts listed the
                     81: .IR distfile .
                     82: .TP
                     83: .B \-n
                     84: Print the commands without executing them. This option is
                     85: useful for debugging
                     86: .IR distfile .
                     87: .TP
                     88: .B \-q
                     89: Quiet mode. Files that are being modified are normally
                     90: printed on standard output. The
                     91: .B \-q
                     92: option suppresses this.
                     93: .TP
                     94: .B \-R
                     95: Remove extraneous files. If a directory is being updated, any files that exist
                     96: on the remote host that do not exist in the master directory are removed.
                     97: This is useful for maintaining truely identical copies of directories.
                     98: .TP
                     99: .B \-h
                    100: Follow symbolic links. Copy the file that the link points to rather than the
                    101: link itself.
                    102: .TP
                    103: .B \-i
                    104: Ignore unresolved links.
                    105: .I Rdist
                    106: will normally try to maintain the link structure of files being transfered
                    107: and warn the user if all the links cannot be found.
                    108: .TP
                    109: .B \-v
                    110: Verify that the files are up to date on all the hosts. Any files
                    111: that are out of date will be displayed but no files will be changed
                    112: nor any mail sent.
                    113: .TP
                    114: .B \-w
                    115: Whole mode. The whole file name is appended to the destination directory
                    116: name. Normally, only the last component of a name is used when renaming files.
                    117: This will preserve the directory structure of the files being
                    118: copied instead of flattening the directory structure. For example,
                    119: renaming a list of files such as ( dir1/f1 dir2/f2 ) to dir3 would create
                    120: files dir3/dir1/f1 and dir3/dir2/f2 instead of dir3/f1 and dir3/f2.
                    121: .TP
                    122: .B \-y
                    123: Younger mode. Files are normally updated if their
                    124: .I mtime
                    125: and
                    126: .I size
                    127: (see
                    128: .IR stat (2))
                    129: disagree. The
                    130: .B \-y
                    131: option causes
                    132: .I rdist
                    133: not to update files that are younger than the master copy.
                    134: This can be used
                    135: to prevent newer copies on other hosts from being replaced.
                    136: A warning message is printed for files which are newer than the master copy.
                    137: .TP
                    138: .B \-b
                    139: Binary comparison. Perform a binary comparison and update files if they differ
                    140: rather than comparing dates and sizes.
                    141: .PP
                    142: .I Distfile
                    143: contains a sequence of entries that specify the files
                    144: to be copied, the destination hosts, and what operations to perform
                    145: to do the updating. Each entry has one of the following formats.
                    146: .nf
                    147: 
                    148: .in +.5i
                    149: <variable name> `=' <name list>
                    150: [ label: ] <source list> `\->' <destination list> <command list>
                    151: [ label: ] <source list> `::' <time_stamp file> <command list>
                    152: .in
                    153: 
                    154: .fi
                    155: The first format is used for defining variables.
                    156: The second format is used for distributing files to other hosts.
                    157: The third format is used for making lists of files that have been changed
                    158: since some given date.
                    159: The \fIsource list\fP specifies a
                    160: list of files and/or directories on the local host which are to be used
                    161: as the master copy for distribution.
                    162: The \fIdestination list\fP is the list of hosts to which these files are to be
                    163: copied.  Each file in the source list is added to a list of changes
                    164: if the file is out of date on the host which is being updated (second format) or
                    165: the file is newer than the time stamp file (third format).
                    166: .PP
                    167: Labels are optional. They are used to identify a command for partial updates.
                    168: .PP
                    169: Newlines, tabs, and blanks are only used as separators and are
                    170: otherwise ignored. Comments begin with `#' and end with a newline.
                    171: .PP
                    172: Variables to be expanded begin with `$' followed by one character or
                    173: a name enclosed in curly braces (see the examples at the end).
                    174: .PP
                    175: The source and destination lists have the following format:
                    176: .nf
                    177: 
                    178: .ti +.5i
                    179: <name>
                    180: or
                    181: .ti +.5i
                    182: `(' <zero or more names separated by white-space> `)'
                    183: 
                    184: .fi
                    185: The shell meta-characters `[', `]', `{', `}', `*', and `?'
                    186: are recognized and expanded (on the local host only) in the same way as
                    187: .IR csh (1).
                    188: They can be escaped with a backslash.
                    189: The `~' character is also expanded in the same way as
                    190: .IR csh
                    191: but is expanded separately on the local and destination hosts.
                    192: When the
                    193: .B \-w
                    194: option is used with a file name that begins with `~', everything except the
                    195: home directory is appended to the destination name.
                    196: File names which do not begin with `/' or `~' use the destination user's
                    197: home directory as the root directory for the rest of the file name.
                    198: .PP
                    199: The command list consists of zero or more commands of the following
                    200: format.
                    201: .nf
                    202: 
                    203: .in +.5i
                    204: .ta \w'install    'u +\w'name list    'u
                    205: `install'      <options>       opt_dest_name `;'
                    206: `notify'       <name list>     `;'
                    207: `except'       <name list>     `;'
                    208: `except_pat'   <pattern list>  `;'
                    209: `special'      <name list>     string `;'
                    210: .in
                    211: 
                    212: .fi
                    213: .PP
                    214: The
                    215: .I install
                    216: command is used to copy out of date files and/or directories.
                    217: Each source file is copied to each host in the destination list.
                    218: Directories are recursively copied in the same way.
                    219: .I Opt_dest_name
                    220: is an optional parameter to rename files.
                    221: If no
                    222: .I install
                    223: command appears in the command list or
                    224: the destination name is not specified,
                    225: the source file name is used.
                    226: Directories in the path name will be created if they
                    227: do not exist on the remote host.
                    228: To help prevent disasters, a non-empty directory on a target host will
                    229: never be replaced with a regular file or a symbolic link.
                    230: However, under the `\-R' option a non-empty directory will be removed
                    231: if the corresponding filename is completely absent on the master host.
                    232: The
                    233: .I options
                    234: are `\-R', `\-h', `\-i', `\-v', `\-w', `\-y', and `\-b'
                    235: and have the same semantics as
                    236: options on the command line except they only apply to the files
                    237: in the source list.
                    238: The login name used on the destination host is the same as the local host
                    239: unless the destination name is of the format ``login@host".
                    240: .PP
                    241: The
                    242: .I notify
                    243: command is used to mail the list of files updated (and any errors
                    244: that may have occured) to the listed names.
                    245: If no `@' appears in the name, the destination host is appended to
                    246: the name
                    247: (e.g., name1@host, name2@host, ...).
                    248: .PP
                    249: The
                    250: .I except
                    251: command is used to update all of the files in the source list
                    252: .B except
                    253: for the files listed in \fIname list\fP.
                    254: This is usually used to copy everything in a directory except certain files.
                    255: .PP
                    256: The
                    257: .I except_pat
                    258: command is like the
                    259: .I except
                    260: command except that \fIpattern list\fP is a list of regular expressions
                    261: (see
                    262: .IR ed (1)
                    263: for details).
                    264: If one of the patterns matches some string within a file name, that file will
                    265: be ignored.
                    266: Note that since `\e' is a quote character, it must be doubled to become
                    267: part of the regular expression.  Variables are expanded in \fIpattern list\fP
                    268: but not shell file pattern matching characters.  To include a `$', it
                    269: must be escaped with `\e'.
                    270: .PP
                    271: The
                    272: .I special
                    273: command is used to specify
                    274: .IR sh (1)
                    275: commands that are to be executed on the
                    276: remote host after the file in \fIname list\fP is updated or installed.
                    277: If the \fIname list\fP is omitted then the shell commands will be executed
                    278: for every file updated or installed.  The shell variable `FILE' is set
                    279: to the current filename before executing the commands in
                    280: .IR string .
                    281: .I String
                    282: starts and ends with `"' and can cross multiple lines in
                    283: .I distfile.
                    284: Multiple commands to the shell should be separated by `;'.
                    285: Commands are executed in the user's home directory on the host
                    286: being updated.
                    287: The
                    288: .I special
                    289: command can be used to rebuild private databases, etc.
                    290: after a program has been updated.
                    291: .PP
                    292: The following is a small example.
                    293: .nf
                    294: 
                    295: .in +.5i
                    296: HOSTS = ( matisse root@arpa)
                    297: 
                    298: FILES = ( /bin /lib /usr/bin /usr/games
                    299:        /usr/include/{*.h,{stand,sys,vax*,pascal,machine}/*.h}
                    300:        /usr/lib /usr/man/man? /usr/ucb /usr/local/rdist )
                    301: 
                    302: EXLIB = ( Mail.rc aliases aliases.dir aliases.pag crontab dshrc
                    303:        sendmail.cf sendmail.fc sendmail.hf sendmail.st uucp vfont )
                    304: 
                    305: ${FILES} -> ${HOSTS}
                    306:        install -R ;
                    307:        except /usr/lib/${EXLIB} ;
                    308:        except /usr/games/lib ;
                    309:        special /usr/lib/sendmail "/usr/lib/sendmail -bz" ;
                    310: 
                    311: srcs:
                    312: /usr/src/bin -> arpa
                    313:        except_pat ( \e\e.o\e$ /SCCS\e$ ) ;
                    314: 
                    315: IMAGEN = (ips dviimp catdvi)
                    316: 
                    317: imagen:
                    318: /usr/local/${IMAGEN} -> arpa
                    319:        install /usr/local/lib ;
                    320:        notify ralph ;
                    321: 
                    322: ${FILES} :: stamp.cory
                    323:        notify root@cory ;
                    324: .in
                    325: 
                    326: .fi
                    327: .SH FILES
                    328: .nf
                    329: .ta \w'/tmp/rdist*    'u
                    330: distfile       input command file
                    331: /tmp/rdist*    temporary file for update lists
                    332: .fi
                    333: .SH "SEE ALSO"
                    334: sh(1), csh(1), stat(2)
                    335: .SH DIAGNOSTICS
                    336: A complaint about mismatch of rdist version numbers may really stem
                    337: from some problem with starting your shell, e.g., you are in too many groups.
                    338: .SH BUGS
                    339: Source files must reside on the local host where rdist is executed.
                    340: .PP
                    341: There is no easy way to have a special command executed after all files
                    342: in a directory have been updated.
                    343: .PP
                    344: Variable expansion only works for name lists; there should be a general macro
                    345: facility.
                    346: .PP
                    347: .I Rdist
                    348: aborts on files which have a negative mtime (before Jan 1, 1970).
                    349: .PP
                    350: There should be a `force' option to allow replacement of non-empty directories
                    351: by regular files or symlinks.  A means of updating file modes and owners
                    352: of otherwise identical files is also needed.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.