Skip to content

Instantly share code, notes, and snippets.

@donchan922
Last active August 11, 2019 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donchan922/21b551c3c9f358b7240169e87c2b0223 to your computer and use it in GitHub Desktop.
Save donchan922/21b551c3c9f358b7240169e87c2b0223 to your computer and use it in GitHub Desktop.
$ scp [クライアントの転送元パス] [サーバのログインユーザ]@[サーバのIP or ホスト名]:[サーバの転送先パス]
# 例1. Macのカレントディレクトリの「hoge.txt」をRaspberry Piのホームディレクトリに転送する
$ scp hoge.txt pi@10.253.131.84:~
# 例2. Macの「hoge/hoge.txt」をRaspberry Piの「/home/pi/foo」に転送する
$ scp hoge/hoge.txt pi@10.253.131.84:/home/pi/foo
# 例3. 複数のファイルをまとめて転送する
$ scp hoge.txt bar.txt pi@10.253.131.84:~
# 例4. ディレクトリごと転送する
$ scp -r hoge pi@10.253.131.84:~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment