Go to the first, previous, next, last section, table of contents.

Specifications of program remsync

The remsync command and arguments

At the shell prompt, calling the command remsync without any parameters initiates an interactive dialog, in which the user types commands and receives feedback from the program.

The command remsync, given at the shell prompt, may have arguments, in which case these arguments taken together form one remsync interactive command. However, `--help' and `--version' options are interpreted especially, with their usual effect in GNU. Once this command has been executed, no more commands are taken from the user and remsync terminates execution. This allows for using remsync in some kind of batch mode. It is unwise to redirect remsync standard input, because user interactions might often be needed in ways difficult to predict in advance.

The two most common usages of remsync are the commands:

remsync b
remsync p

The first example executes the broadcast command, which sends synchronization packages to all connected remote sites for the current local directory tree.

The second example executes the process command, which studies and complies with a synchronisation package saved in the current directory (not necessarily into the synchronized directory tree), under the usual file name `remsync.tar.gz'.

Automatic mechanisms in the remsync program

The following points apply to many of the remsync commands. We describe them here once and for all.

Commands for remsync

Program commands to remsync may be given interactively by the user sitten at a terminal. They can come from the arguments of the remsync call at the shell level. Internally, the process command might obey many sub-commands found in a received synchronization package.

Program commands are given one per line. Lines beginning with a sharp (#) and white lines are ignored, they are meant to increase clarity or to introduce user comments. With only a few exceptions, commands are introduced by a keyword and often contains other keywords. In all cases, the keywords specific to remsync may be abbreviated to their first letter. When there are many keywords in succession, the space separating them may be omitted. So the following commands are all equivalent:

list remote
l remote
list r
l r
listremote
lr

while the following are not legal:

l rem
lisremote

Below, for clarity, keywords are written in full and separated by spaces. Commands often accept parameters, which are then separated by spaces. All available commands are given in the table. The first few commands do not pre-require the file `.remsync'. The last three commands are almost never used interactively, but rather automatically triggered while process'ing received synchronization packages.

?
Display a quick help summary of available commands.
! [ shell-command ]
If shell-command has been given, execute it right now as a shell command. When not given, rather start an interactive shell. Exiting from the shell will return to this program. The started shell is taken from the SHELL environment variable if set, else sh is used.
quit
Leave the program normally and return to the shell.
abort
Leave the program with a non-zero exit status and return to the shell. No attempt is made to save a logically modified `.remsync' file.
visit directory
Select another synchronized directory tree for any subsequent operation. directory is the top directory of the synchronized directory tree.
process [ file ]
list [ type ]
List all known statements about some information type. Allowable keywords for type are local, remote, scan, ignore and files. The keyword files asks for all empty statements (see later). If type is omitted, then list all known statements for all types, except those given by files.
[ create ] type value
Create a new statement introducing a value for a given type. Allowable keywords for type are remote, scan and ignore. The create keyword may be omitted. For create ignore, when the pattern is preceeded by a bang (!), the condition is reversed. That is, only those files which do match the pattern will be kept for synchronization.
delete type value
Delete an existing statement supporting some value for a given type. Allowable keywords for type are remote, scan and ignore.
email remote value
Modify the electronic mail address associated with some remote site, giving it a new value. The special local keyword for remote may be used to modify the local electronic mail address.
home remote value
Modify the top directory of the synchronized directory tree associated with some remote site, giving it a new value. The special local keyword for remote may be used to modify the local top directory.
broadcast site_list
Send by electronic mail an update package to all sites from site_list, containing for each site all and only those files which are known to be different between the remote site and here.
version version
This command is not meant for interactive use. It establishes the remsync version needed to process the incoming commands.
from site_list
This command is not really meant for interactive use. The first site from the site_list is the remote site which originated the synchronization package. All the others are all the sites, including here, which were meant to be synchronized by the broadcast command that was issued at the originating remote site.
sum file checksum
This command is not really meant for interactive use. It declares the checksum value of a particular file at the originating remote site. Also, if at least one sum command is received, then it is guaranteed that the originating remote site sent one sum command for each and every file to be synchronized, so any found local file which was not subject of any sum command does not exist remotely.
if file checksum packaged
This command is not really meant for interactive use. It directs the remsync program to check if a local file has a given checksum. If the checksum agrees, then the local file will be replaced by the packaged file, as found in the received synchronization invoice.

Go to the first, previous, next, last section, table of contents.