月曜日, 6月 20, 2016

ファイルパスとファイルサイズでリモートホストとdiff

リモートホストにはリモートユーザでパスワードなしでssh接続できる前提。

diff <(ssh リモートユーザ@リモートホスト 'ls -l $(find 対象ディレクトリのパス -type f)' | awk '{print $5 " " $10;}') <(ls -l $(find 対象ディレクトリのパス -type f) | awk '{print $5 " " $10;}')