Annotation of 43BSDReno/contrib/isode-beta/others/idist/idist.1c, revision 1.1

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