Giter VIP home page Giter VIP logo

Comments (2)

windvalley avatar windvalley commented on May 26, 2024

Subcommand fetch first version usage show:

$ gossh fetch -h

Copy files/dirs from target hosts to local.

Usage:
  gossh fetch [flags]

Examples:

  # Copy host1:/path/foo to local /tmp/backup/host1/path/foo.
  $ gossh fetch host1 -f /path/foo -d /tmp/backup

  # Copy files and dirs from target hosts to local dir /tmp/backup/,
  # and files in local dir /tmp/backup/ would be:
  #    /tmp/backup/host1/path1/foo.txt
  #    /tmp/backup/host1/path2/bar/
  #    /tmp/backup/host2/path1/foo.txt
  #    /tmp/backup/host2/path2/bar/
  #
  $ gossh fetch host1 host2 -f /path1/foo.txt -f /path2/bar/ -d /tmp/backup
    or
  $ gossh fetch host1 host2 -f /path1/foo.txt,/path2/bar/ -d /tmp/backup

Flags:
  -d, --dest-path string   local directory that files/dirs from target hosts will be copied to
  -f, --files strings      files/dirs on target hosts that to be copied
  -h, --help               help for fetch

Global Flags:
  -k, --auth.ask-pass                  ask for password of login user
  -a, --auth.file string               file containing the credentials (format: "username:password")
  -i, --auth.identity-files strings    identity files (default $HOME/.ssh/{id_rsa,id_dsa})
  -K, --auth.passphrase string         passphrase of the identity files
  -p, --auth.password string           password of the login user
  -u, --auth.user string               login user (default $USER)
      --config string                  config file (default {$PWD,$HOME}/.gossh.yaml)
  -H, --hosts.file string              file containing target hosts (format: one host/pattern per line)
  -L, --hosts.list                     outputs a list of target hosts, and does not do anything else
  -P, --hosts.port int                 port of target hosts (default 22)
  -C, --output.condense                condense output and disable color
  -o, --output.file string             file to which messages are output
  -j, --output.json                    output messages in json format
  -q, --output.quiet                   do not output messages to screen (except error messages)
  -v, --output.verbose                 show debug messages
      --proxy.identity-files strings   identity files for proxy (default same as 'auth.identity-files')
      --proxy.passphrase string        passphrase of the identity files for proxy
                                       (default same as 'auth.passphrase')
      --proxy.password string          password for proxy (default same as 'auth.password')
      --proxy.port int                 proxy server port (default 22)
  -X, --proxy.server string            proxy server address
      --proxy.user string              login user for proxy (default same as 'auth.user')
  -U, --run.as-user string             run via sudo as this user (default "root")
  -c, --run.concurrency int            number of concurrent connections (default 1)
  -l, --run.lang string                specify i18n while executing command (e.g. zh_CN.UTF-8|en_US.UTF-8)
  -s, --run.sudo                       use sudo to execute commands/script
      --timeout.command int            timeout seconds for executing commands/script on each target host
                                       or copying local files and dirs to each target host
                                       or copying files and dirs from each target host to local
      --timeout.conn int               timeout seconds for connecting each target host (default 10)
      --timeout.task int               timeout seconds for the current gossh task

from gossh.

windvalley avatar windvalley commented on May 26, 2024

Add fetch demo screenshot:

  1. Success(at least one file or dir is valid):

image

  1. Failed(all files or dirs not exist):

image

  1. Failed(all files or dirs no permission):

image

  1. Failed(command 'zip' not installed on target hosts):

image

from gossh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.