Package osh :: Package command :: Module copyto
[frames] | no frames]

Module copyto

source code

copyto [-rpC] FILE ... REMOTE_DIR

Copies FILEs to REMOTE_DIR on each node of a cluster. The cluster is identified using remote execution syntax, for example:

   osh @fred [ copyto log.properties /opt/foobar/config ]

REMOTE_DIR must be an absolute path, (i.e. must begin with '/').

copyto is implemented using scp, and the following scp flags are supported:

Functions
 
copyto(files, compress=False, recursive=False, preserve=False)
Copies files to each node of the specified cluster.
source code
Function Details

copyto(files, compress=False, recursive=False, preserve=False)

source code 

Copies files to each node of the specified cluster. The last elements of files is the target directory on each node. The preceding elements are the local files to be copied. Compression is used for copying if compress is True. Directories are copied recursively if recursive is True. File attributes are preserved if preserve is True.