diff --git a/tsshbatch.rst b/tsshbatch.rst index 8d6fe56..0c1dddd 100644 --- a/tsshbatch.rst +++ b/tsshbatch.rst @@ -35,6 +35,22 @@ on either the command line or in the ``$TSSHBATCH`` environment variable: + -G spec GET file on host and write local dest directory. + ``spec`` is a quoted pair of strings. The first + secifies the path of the source file (on the + remote machine) to copy. The second, specifies + the destination *directory* (on the local + machine):: + + tsshbatch.py -G "/foo/bar/baz /tmp" hostlist + + This copies ``/foo/bar/baz`` from every machine in + ``hostlist`` to the local ``/tmp/`` directory. Since all + the files have the same name, they would overwrite + each other if copied into the same directory. So, + ``tsshbatch`` prepends the string ``hostname:`` to + the name of each file it saves locally. + -H hostlist List of hosts on which to run the command. This should be enclosed in *quotes* so that the list of hosts is handed to the -H option as a single argument:: @@ -43,6 +59,17 @@ -N Force interactive username dialog + -P spec PUT file from local machine to remote machine destination + directory. ``spec`` is a quoted pair of strings. + The first secifies the path of the source file (on + the local machine) to copy. The second, specifies + the destination *directory* (on the remote machine):: + + tsshbatch.py -P "/foo/bar/baz /tmp" hostlist + + This copies ``/foo/bar/baz`` on the local + machine to ``/tmp/`` on every host in ``hostlist``. + -e Don't report remote host stderr output -h Print help information @@ -280,6 +307,43 @@ 3. Forced interactive prompting for user name with ``$USER`` as the default. 4. Using ``$USER`` as the login name and prompting only for password. (Default program behavior). +6) File Transfers + + The ``-G`` and ``-P`` options specify file ``GET`` and + ``PUT`` respectively. Both are followed by a quoted + file transfer specification in the form:: + + "path-to-source-file path-to-destination-directory" + + Note that this means the file will always be stored under + its original name in the destination directory. Renaming + isn't possible during file transfer. + + However, ``tsshbatch`` always does ``GETs`` then ``PUTs`` + *then* any outstanding command (if any) at the end of the + command line. This permits renaming on the remote machine + after a ``PUT``:: + + tsshbatch.py -P "foo ./" hostlist mv -v foo foo.has.a.new.name + + ``GETs`` are a bit of a different story because you are retrieving + a file of the same name on every host. To avoid having all + but the last one clobber the previous one, ``tsshbatch`` makes + forces the files you ``GET`` to be uniquely named by prepending + the hostname and a ":" to the actual file name:: + + tssbatch.py -H myhost -G "foo ./" + + This saves the file ``myhost:foo`` in the ``./`` on your + local machine. + + The commands do not recognize any special directory + shortcut symbols like ``~/``. You must name file and + directory locations using ordinary pathing conventions. + + If any file transfer fails, for any reason, the program + is aborted and no further work is done. + OTHER ----- @@ -349,7 +413,7 @@ :: - $Id: tsshbatch.rst,v 1.112 2013/10/20 23:09:33 tundra Exp $ + $Id: tsshbatch.rst,v 1.113 2013/10/21 19:42:07 tundra Exp $ You can find the latest version of this program at: