SYNCTREE.1
资源名称:os_source.zip [点击查看]
上传用户:datang2001
上传日期:2007-02-01
资源大小:53269k
文件大小:3k
源码类别:
操作系统开发
开发平台:
C/C++
- .TH SYNCTREE 1
- .SH NAME
- synctree - synchronize directory trees.
- .SH SYNOPSIS
- .nf
- fBsynctreefP [fB-iuffP] [[fIuser1fP@]fImachine1fP:]fIdir1fP [[fIuser2fP@]fImachine2fP:]fIdir2fP
- .fi
- .SH DESCRIPTION
- .B Synctree
- synchronizes the directory tree rooted at fIdir2fP with fIdir1fP. It
- walks recursively through both trees, and deletes and adds files in
- fIdir2fP to make it equal to fIdir1fP. Mode, owner and group are set for
- each file unless the fB-ufP flag is given. In its normal mode of operation,
- synctree will ask if it may delete or add directories assuming that you don't
- want to. Non-directories are simply deleted or added, but synctree will ask if
- it needs to update a normal file with a default answer of 'y'. Simply typing
- return will choose the default answer, typing end-of-file is like typing
- return to this question and all other questions.
- .PP
- You can specify a hostname and user-id to be used to access fIdir1fP or
- fIdir2fP. Synctree will use fBrshfP(1) to run a copy of itself on
- the remote machine. The call interface mimics that of fBrcpfP(1), but
- you can use more than one user@machine prefix if you want to make things
- really interesting.
- .PP
- Hard links are enforced, an update is done by first deleting the old file
- so that links to unknown files are broken. Links to files within fIdir2fP
- will be restored.
- .PP
- If either directory contains the file fB.backupfP, then this file will
- be used as an alternate inode table. This allows one to make a backup copy
- of a file tree full of special files and differing user-ids on a remote
- machine under an unpriviledged user-id.
- .PP
- .SH OPTIONS
- .TP 5
- .B -i
- Ask for permission (with default answer 'n') to delete or
- add any file or directory.
- .TP 5
- .B -u
- Only install newer files, i.e. merge the directory trees.
- .TP 5
- .B -f
- Don't ask, think 'yes' on any question.
- .SH "SEE ALSO"
- .BR remsync (1),
- .BR cpdir (1),
- .BR rsh (1),
- .BR rcp (1),
- .BR perror (3).
- .SH DIAGNOSTICS
- Messages may come from three different processes. One named "Slave" running
- in fIdir1fP, one named "Master" running in fIdir2fP, and synctree itself
- in a mediator role. The mediator will also perform the task of either the
- master or the slave if one of them is running locally. You need to know this
- to interpret the error messages coming from one of these processes. The
- messages are normally based on fBperrorfP(3). Failure to contact a remote
- machine will be reported by fBrshfP. fBSynctreefP should have a zero
- exit status if no errors have been encountered.
- .SH BUGS
- Directory fIdir2fP will be created without asking.
- .PP
- The master and slave processes get their error output mixed up sometimes
- (nice puzzle).
- .PP
- The local and remote machine must use the same file type encoding.
- .PP
- The link replacement strategy may lead to lack of space on a small device.
- Let fBsynctreefP run to completion and then rerun it to pick up the pieces.
- .PP
- Letting the local process keep its "synctree" name may be a mistake.
- .PP
- It talks too much.
- .SH AUTHOR
- Kees J. Bot, (kjb@cs.vu.nl)