?? sitecopy.1
字號(hào):
.\" Copyright 1999 Joe Orton.TH sitecopy 1 "July 1999" sitecopy "User Manuals".SH NAMEsitecopy \- maintain remote copies of web sites.SH SYNOPSIS.B sitecopy [options] [operation mode] .I sitename.B ....SH DESCRIPTION.I sitecopyis for copying locally stored web sites to remote web servers. Asingle command will upload files to the server which have changedlocally, and delete files from the server which have been removedlocally, to keep the remote site synchronized with the local site.The aim is to remove the hassle of uploading and deleting individualfiles using an FTP client. sitecopy will also optionally try to spotfiles you move locally, and move them remotely.FTP, WebDAV and other HTTP-based authoring servers (for instance,AOLserver and Netscape Enterprise) are supported..SH GETTING STARTEDThis section covers how to start maintaining a web site usingsitecopy. After introducing the basics, two situations are covered:first, where you already have a remote copy of the site; second, whereyou don't. Lastly, normal site maintainance activities are explained..SS Introducing the BasicsIf you have not already done so, you need to create an rcfile, whichwill store information about the sites you wish to adminster. You alsoneed to create a storage directory, which sitecopy uses to record thestate of the files on each of the remote sites. The rcfile and storagedirectory must both be accessible only by you - sitecopy will not runotherwise. To create the storage directory with the correctpermissions, use the command.br.B " mkdir -m 700 .sitecopy".brfrom your home directory. To create the rcfile, use the commands.br.B " touch .sitecopyrc".br.B " chmod 600 .sitecopyrc".brfrom your home directory. Once this is done, edit the rcfile to enteryour site details as shown in the CONFIGURATION section..SS Existing Remote SiteIf you already have a local copy of the site, ensure your local filesare synchronized with the remote files. Then, run.br.B " sitecopy --catchup sitename".brwhere sitename is the name of the site you used after the .B sitekeyword in the rcfile.If you do not have a local copy of the remote site, then you can use.B fetch modeto discover what is on the remote site, and.B synchronize modeto download it. Fetch mode works well for WebDAV servers, and mightwork if you're lucky for FTP servers. Run.br.B " sitecopy --fetch sitename".brto fetch the site - if this succeeds, then run.br.B " sitecopy --synch sitename".brto download a local copy..SS New Remote SiteEnsure that the root directory of the site has been created on theserver by the server administrator. Run.br.B " sitecopy --init sitename".brwhere sitename is the name of the site you used after the .B sitekeyword in the rcfile..SS Site MaintenanceAfter setting up the site as given in one of the two above sections,you can now start editing your local files as normal. When you havefinished a set of changes, and you want to update the remote copy ofthe site, run:.br.B " sitecopy --update sitename".brand all the changed files will be uploaded to the server. Any filesyou delete locally will be deleted remotely too, unless the.B nodelete option is specified in the rcfile. If you move any files betweendirectories, the remote files will be deleted remotely then uploadedagain unless you specify the.B checkmovedoption in the rcfile..SS Synchronization ProblemsIn some circumstances, the actual files which make up the remote sitewill be different from what sitecopy.I thinksis on the remote site. This can happen, for instance, if theconnection to the server is broken during an update. When thissitatuation arises,.B Fetch Modeshould be used to fetch the list of files making up the site from theremote server..SH INVOCATIONIn normal operation, specify a .I singleoperation mode, followed by any options you choose, then one or moresite names. For instance,.br.B " sitecopy --update --quiet mainsite anothersite".brwill quietly update the sites named 'mainsite' and 'anothersite'..SH OPERATION MODES.IP "-l, --list".B List Mode\- produces a listing of all the differences between thelocal files and the remote copy for the specified sites..IP "-ll, --flatlist".B Flat list Mode\- like list mode, except the output produced is suitable for parsing by an external script or program. An AWK script,.B changes.awk.is provided which produces an HTML page from this mode..IP "-u, --update".B Update Mode\- updates the remote copy of the specified sites..IP "-f, --fetch".B Fetch Mode\- fetches the list of files from the remote server. Note that thismode has only limited support in FTP - the server must accept the.B MDTMcommand, and use a Unix-style 'ls' for LIST implementation..IP "-s, --synchronize".B Synchronize Mode\- updates the .I localsite from the remote copy. .B WARNING:This mode overwrites local files. Use with care..IP "-i, --initialize".B Initialization Mode\- initializes the sites specified - making sitecopy think there are NOfiles on the remote server..IP "\-c, \-\-catchup".B Catchup Mode\- makes sitecopy think the local site is exactly the same as theremote copy..IP "-v, --view".B View Mode\- displays all the site definitions from the rcfile..IP "-h, --help"Display help information..IP "-V, --version"Display version information..SH OPTIONS.IP "-y, --prompting"Applicable in.B Update Modeonly, will prompt the user for confirmation for each update(i.e., creating a directory, uploading a file etc.)..IP "-r RCFILE, --rcfile=RCFILE"Specify an alternate run control file location..IP "-p PATH, --storepath=PATH"Specify an alternate location to use for the remote site storage directory..IP "-q, --quiet"Quiet output - display the filename only for each update performed..IP "-qq, --silent"Very quiet output - display nothing for each update performed..IP "-a, --allsites"Perform the given operation on all sites - applicable for allmodes except.B View Mode,for which it has no effect..IP "-d MASK, --debug=MASK"Turns on debugging. The integer.I MASKspecifies which functions debugging is produced for, and isthe sum of any of the following:.br 1 Socket handling.br 2 File handling.br 4 rcfile parser.br 8 HTTP driver.br 16 FTP driver.br 32 Gtk interface.br.SH RETURN VALUESReturn values are specified for different operation modes. If multiplesites are specified on the command line, the return value is inrespect to the last site given..SS Update Mode -1 ... update never even started - configuration problem 0 ... update was entirely successful. 1 ... update went wrong somewhere 2 ... could not connect or login to server .SS List Mode -1 ... could not form list - configuration problem 0 ... the remote site does not need updating 1 ... the remote site needs updating.SH CONFIGURATIONConfiguration is performed via the run control file (rcfile). Thisfile contains a set of site definitions. A unique name is assigned toevery site definition, which is used on the command line to refer tothe site..PPEach site definition contains the details of the server the site isstored on, how the site may be accessed at that server, where the siteis held locally and remotely, and any other options for the site..SS Site DefinitionA site definition is made up of a series of lines:.BR "site " sitename.br.BR " server " server-name.br [ .BR port " port-number ]".br [.BR "proxy-server " proxy-name.br.BR " proxy-port " "port-number ]" [ .BR "url " "siteURL ]".br [ .BR "protocol " "{ ftp | http } ]".br [ .BR ftp " nopasv ]".br [ .BR http " noexpect ]".br.BR " username " username.br.BR " password " password.br.BR " remote " remote-root-directory.br.BR " local " local-root-directory [ .BR permissions " { ignore | exec | all } ]" [ .BR symlinks " { ignore | follow | maintain } ]" [ .BR nodelete " ]" [ .BR nooverwrite " ]" [ .BR checkmoved " ]" [ .BR exclude " pattern ]..." [ .BR ascii " pattern ]..."Anything after a hash (#) in a line is ignored as a comment.Values may be quoted and characters may be backslash-escaped.e.g., to use the.B excludepattern *#, use the following line:.br.BR " exclude " """*#""".SS Remote Server OptionsThe.B serverkey is used to specify the remote server the site is stored on.This may be either a DNS name or IP address. A connection is madeto the default port for the protocol used, or that given by the.B portkey.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -