在 stackoverflow 上找到了解答、就是用 grep 去過濾輸出的訊息
# rsync -ave ssh 192.168.1.1:/home/abc . | grep -E -v '/$'
receiving file list ... done
abc/def/sohappy.log
sent 5.41K bytes received 162.41K bytes 111.88K bytes/sec
total size is 119.32M speedup is 710.97
但是如果有使用 --delete 參數的話、就要改一下
# rsync -ave ssh --delete 192.168.1.1:/home/abc . | grep -E '^deleting|[^/]$'
receiving file list ... done
abc/def/sohappy.log
deleting abc/jkl/
sent 5.41K bytes received 162.41K bytes 111.88K bytes/sec
total size is 119.32M speedup is 710.97
reference:https://stackoverflow.com/questions/8580873/do-not-show-directories-in-rsync-output
0 意見:
張貼留言