scpでネットワーク越しにコピー
<scpはSecure Copyの略>
※CentOSなどのディストリビューションでは
「yum install operssh-clients」でインストールの必要あり
7pc:-$ scp ./file.ext aaa@192.168.1.10:/tmp/
aaa=>ログインユーザー
192.168.1.10=>移転先のコンピュータ(ホスト名またはIPアドレス)
/tmp/=>コピー先
こんなかき方もできます
7pc:-$ scp ./file.ext aaa@host:~/(ログインに使ったユーザーのホーム)
7pc:-$ scp ./file.ext aaa@host:~bbb(他のユーザーbbbのホーム)
7pc:-$ scp ./file.ext aaa@host:../../tmp/(相対パスはログイン後のホームディレクトリが起点となる)
まとめてファイルをコピーするには
scp aaa@host:/tmp/*.log /tmp
scp -r aaa@host:/tmp/results /tmp/
-rオプションでディレクトリを再帰的にコピー(コピー元にディレクトリを指定)