GNU shar utilities: 4.4 Commands for remsync

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 4.4 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 nonzero 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.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Bruce Korb on July, 24 2005 using texi2html 1.76.