我总是在下面使用rsync命令进行备份。
$ rsync -auvvz source_dir destination_dir
为了增加详细程度,我使用选项v
。
但是,在这种情况下,有太多日志可以在控制台上获取新的更新文件日志。
离)
hgoe/foo/foo/test1 is uptodate
hgoe/foo/foo/test2 <- I want to pick up logs like this.
hgoe/foo/foo/test3 is uptodate
如何拿起日志?
答案 0 :(得分:0)
丑陋但正在努力工作,
rsync -auvvz source_dir destination_dir| grep -vE '(sending incremental file list|delta-transmission disabled| is uptodate|total: matches=| bytes/sec| speedup is |^$)'
grep -v 对应于--invert-match选项,
而 -E , - --extended-regexp one
^ $ 删除空白行
其他模式都包含在rsync -auvvz的默认输出中