Last active
December 15, 2015 23:49
-
-
Save hdemon/5342848 to your computer and use it in GitHub Desktop.
hogeにsshで接続してファイルを指定条件で検索した後、それらのファイルをscpで持ってくるコマンド
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh hoge 'find /var/log/nginx -name "access*" -mtime -30' | sed -e "s/\/var\/log\/nginx\///g" | xargs -I {} scp -P 22 fuga@localhost:/var/log/nginx/{} ./{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment