commands
option
Show or change the script options.
Syntax
Section titled “Syntax”option [<name> [<value>]]With no argument, option prints every script option and its current
value. With a name, it prints that one. With a name and a value, it sets
the option and prints the result.
Some options start from your linscp preferences. Changing them here lasts
only until linscp-cli exits and never touches the saved configuration.
The options are described below.
Script options
Section titled “Script options”on | off
With on, linscp-cli prints each command before it runs it. This helps
when you read the output of a long script. The default is off.
on | off | abort | continue
Controls what happens when a command needs an answer or fails.
off(default):linscp-cliasks you.on: every question gets a negative answer, so the script never waits. Combine it withoption confirm off, or existing files are not overwritten.abort: questions are answered as withon, and the first error stops the script with exit code 1.continue: errors are reported and the script goes on.
Choosing any batch mode also limits reconnecttime to
120 seconds if it was off.
confirm
Section titled “confirm”on | off
With on (default), get and put ask before they overwrite an existing
file. Set it to off in scripts that should replace files without asking.
reconnecttime
Section titled “reconnecttime”off | <seconds>
How long linscp-cli keeps trying to restore a dropped connection during
a transfer or synchronization before it reports an error. off (default)
means no limit.
failonnomatch
Section titled “failonnomatch”on | off
Decides whether a mask that matches nothing is an error. With off
(default), the command prints a message and the script continues. With
on, the command fails, which stops a script running in batch abort
mode. It applies to get, put, rm, mv, cp, chmod, ls and
lls.
Examples
Section titled “Examples”The usual start of an unattended script.
option batch abortoption confirm off