📄 idist.1c
字号:
.TH IDIST 1C "14 Sep 1988".\" $Header: /xtel/isode/isode/others/idist/RCS/idist.1c,v 9.0 1992/06/16 12:42:00 isode Rel $.\".\" $Log: idist.1c,v $.\" Revision 9.0 1992/06/16 12:42:00 isode.\" Release 8.0.\".\" .SH NAMEidist \- remote file distribution program.SH SYNOPSIS.B idist[ \-nqbRhivwyQ ][ \-f distfile ] [ \-d var=value ] [ \-m host ][ name ... ].PP.B idist[ \-nqbRhivwy ] -c name ... [login@]host[:dest].SH DESCRIPTION.I Idistis a program to maintain identical copies of files over multiplehosts. It preserves where possible the owner, group, mode, and lastmodified time of files and can update programs that areexecuting..I Idistreads commands from.I distfileto direct the updating of files and/or directories. If is as far aspossible identical in its action as the standard BSD rdist(1) command,modulo a few bug fixes and some small changes.If.I distfileis `\-', the standard input is used.If no.B \-foption is present, the program looks first for `distfile',then `Distfile' to use as the input.If no names are specified on the command line,.I idistwill update all of the files and directories listed in.IR distfile .Otherwise, the argument is taken to be the name of a file to be updatedor the label of a command to execute.If label and file names conflict,it is assumed to be a label.These may be used together to update specific filesusing specific commands..PPThe.B \-coption forces.I idistto interpret the remaining arguments as a small.IR distfile .The equivalent distfile is as follows..nf.sp.ti +.5i( \fIname\fP ... ) -> [\fIlogin\fP@]\fIhost\fP.ti +1iinstall [\fIdest\fP] ;.sp.fi.PPOther options:.TP.B \-dDefine.I varto have.IR value .The.B \-doption is used to define or override variable definitions in the.IR distfile ..I Valuecan be the empty string, one name, or a list of names surrounded byparentheses and separated by tabs and/or spaces..TP.B \-mLimit which machines are to be updated.Multiple.B -marguments can be given to limit updates to a subset of the hostslisted in the.IR distfile ..TP.B \-nPrint the commands without executing them.This option is useful for debugging.IR distfile ..TP.B \-qQuiet mode.Files that are being modified are normally printed on standard output.The.B \-qoption suppresses this..TP.B \-RRemove extraneous files.If a directory is being updated, any files that existon the remote host that do not exist in the master directory are removed.This is useful for maintaining truely identical copies of directories..TP.B \-hFollow symbolic links.Copy the file that the link points to rather than the link itself..TP.B \-iIgnore unresolved links..I Idistwill normally try to maintain the link structure of files being transferedand warn the user if all the links cannot be found..TP.B \-vVerify that the files are up to date on all the hosts.Any filesthat are out of date will be displayed but no files will be changednor any mail sent..TP.B \-wWhole 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 directory structure of the files beingcopied instead of flattening the directory structure.For example,renaming a list of files such as ( dir1/f1 dir2/f2 ) to dir3 would createfiles dir3/dir1/f1 and dir3/dir2/f2 instead of dir3/f1 and dir3/f2..TP.B \-yYounger mode.Files are normally updated if their.I mtimeand.I size(see.IR stat (2))disagree.The.B \-yoption causes.I idistnot to update files that are younger than the master copy.This can be usedto prevent newer copies on other hosts from being replaced.A warning message is printed for files which are newer than the master copy..TP.B \-bBinary comparison.Perform a binary comparison and update files if they differrather than comparing dates and sizes..TP.B \-QQuery mode. Each operation that might be performed is first queried.The user should reply with a y if the operation is to be performed.Anything else aborts that particular operation..PP.I Distfilecontains a sequence of entries that specify the filesto be copied, the destination hosts, and what operations to performto do the updating.Each entry has one of the following formats..nf.sp.in +.5i<variable name> `=' <name list>[ label: ] <source list> `\->' <destination list> <command list>[ label: ] <source list> `::' <time_stamp file> <command list>.in.sp.fiThe first format is used for defining variables.The second format is used for distributing files to other hosts.The third format is used for making lists of files that have been changedsince some given date.The.I "source list"specifies alist of files and/or directories on the local host which are to be usedas the master copy for distribution.The.I "destination list"is the list of hosts to which these files are to be copied.Each file in the source list is added to a list of changesif the file is out of date on the host being updated (second format) orthe file is newer than the time stamp file (third format)..PPLabels are optional.They are used to identify a command for partial updates..PPNewlines, tabs, and blanks are only used as separators and areotherwise ignored.Comments begin with `#' and end with a newline..PPVariables to be expanded begin with `$' followed by one character ora name enclosed in curly braces (see the examples at the end)..PPThe source and destination lists have the following format:.nf.ti +.5i<name>or.ti +.5i`(' <zero or more names separated by white-space> `)'.fiThe shell meta-characters `[', `]', `{', `}', `*', and `?'are recognized and expanded (on the local host only) in the same way as.IR csh (1).They can be escaped with a backslash.The `~' character is also expanded in the same way as.IR cshbut is expanded separately on the local and destination hosts..PPThe command list consists of zero or more commands of the followingformat..nf.in +.5i.ta \w'install 'u +\w'name list 'u`install' <options> opt_dest_name `;'`notify' <name list> `;'`except' <name list> `;'`except_pat' <pattern list> `;'`special' <name list> string `;'.in.fi.PPThe.I installcommand is used to copy out of date files and/or directories.Each source file is copied to each host in the destination list.Directories are recursively copied in the same way..I Opt_dest_nameis an optional parameter to rename files.If no.I installcommand appears in the command list orthe destination name is not specified,the source file name is used.Directories in the path name will be created if theydo not exist on the remote host.To help prevent disasters, a non-empty directory on a target host willnever be replaced with a regular file or a symbolic link.However, under the `\-R' option a non-empty directory will be removedif the corresponding filename is completely absent on the master host.The.I optionsare `\-R', `\-h', `\-i', `\-v', `\-w', `\-y', and `\-b'and have the same semantics asoptions on the command line except they only apply to the filesin the source list.The login name used on the destination host is prompted for and apassword is required too. The password is not echoed and the defaultlogin name is either the one specified in the distfile or the currentusername. .PPThe.I notifycommand is used to mail the list of files updated (and any errorsthat may have occured) to the listed names.If no `@' appears in the name, the destination host is appended tothe name(e.g., name1@host, name2@host, ...)..PPThe.I exceptcommand is used to update all of the files in the source list.B exceptfor the files listed in \fIname list\fP.This is usually used to copy everything in a directory except certain files..PPThe.I except_patcommand is like the.I exceptcommand except that.I "pattern list"is a list of regular expressions(see.IR ed (1)for details).If one of the patterns matches some string within a file name, that file willbe ignored.Note that since `\e' is a quote character, it must be doubled to becomepart of the regular expression.Variables are expanded in.I "pattern list"but not shell file pattern matching characters.To include a `$', itmust be escaped with `\e'..PPThe.I specialcommand is used to specify.IR sh (1)commands that are to be executed on theremote host after the file in.I "name list"is updated or installed.If the.I "name list"is omitted then the shell commands will be executedfor every file updated or installed.The shell variable `FILE' is setto the current filename before executing the commands in.IR string ..I Stringstarts and ends with `"' and can cross multiple lines in.I distfile.Multiple commands to the shell should be separated by `;'.Commands are executed in the user's home directory on the hostbeing updated.The.I specialcommand can be used to rebuild private databases, etc.\&after a program has been updated..PPThe following is a small example..nf.in +.5iHOSTS = ( matisse root@arpa )FILES = ( /bin /lib /usr/bin /usr/games /usr/include/{*.h,{stand,sys,vax*,pascal,machine}/*.h} /usr/lib /usr/man/man? /usr/ucb /usr/local/idist )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/games/lib ; special /usr/lib/sendmail "/usr/lib/sendmail -bz" ;srcs:/usr/src/bin -> arpa except_pat ( \e\e.o\e$ /SCCS\e$ ) ;IMAGEN = (ips dviimp catdvi)imagen:/usr/local/${IMAGEN} -> arpa install /usr/local/lib ; notify ralph ;${FILES} :: stamp.cory notify root@cory ;.in.fi.SH FILES.nf.ta \w'/tmp/idist* 'udistfile input command file/tmp/idist* temporary file for update lists.fi.SH "SEE ALSO"sh(1), csh(1), stat(2), rdist(1).SH DIAGNOSTICSUsually due to permissions problems..SH AUTHORJulian OnionsNottingham University.brbased on the UCB TCP/IP service..SH BUGSSource files must reside on the local host where idist is executed..PPThere is no easy way to have a special command executed after all filesin a directory have been updated..PPVariable expansion only works for name lists;there should be a general macro facility..PP.I Idistaborts on files which have a negative mtime (before Jan 1, 1970)..PPThere should be a `force' option to allow replacement of non-empty directoriesby regular files or symlinks.A means of updating file modes and ownersof otherwise identical files is also needed.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -