Command line download and upload file

· 8's blog


  1. scp
usage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]
            [-J destination] [-l limit] [-o ssh_option] [-P port]
            [-S program] source ... target

upload to server
scp ./niganma.mp3 root@16.25.22.98:/opt/

download from server scp root@16.25.22.98:/opt/niganma.mp3 D:

  1. rsync
-v, --verbose               increase verbosity
-a, --archive               archive mode; equals -rlptgoD
-W, --whole-file            copy files whole (without delta-xfer algorithm)

upload to server
rsync -avz ./niganma.mp3 root@16.25.22.98:/opt

download from server rsync -Wav root@16.25.22.98:/opt/niganma.mp3 ./

使用场景

https://github.com/picosh/pico

my account ssh 6@prose.sh same pk ssh 7@prose.sh remote pk ssh 8@prose.sh same pk