役に立つテクニック集

tar czf - -C source_dir source_file | ssh user@remote-host 'tar zxvf - -C destination_dir'

とします。source_file はファイルでもディレクトリでも大丈夫です(ディレクトリなら再帰的に転送されます)。

ssh user@remote-host 'tar czf - -C source_dir source_file' | tar zxvf - -C destination_dir

とします。source_file はファイルでもディレクトリでも大丈夫です(ディレクトリなら再帰的に転送されます)。

cat source_dir/source_file | ssh user@remote-host 'cat > destination_dir/destination_file'
gzip -c source_dir/source_file | ssh user@remote-host 'gunzip > destination_dir/destination_file'

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS