Unix 与来自的文件中的find进行rsync
我正在尝试传输31天内更新的文件。我想跑Unix 与来自的文件中的find进行rsync,unix,rsync,Unix,Rsync,我正在尝试传输31天内更新的文件。我想跑 /bin/rsync --remove-source-files --files-from="<(find /tmp/rsync/source -type f -mtime -31 -print0)" /tmp/rsync/source /tmp/rsync/destination 试过了,这对我有好处 find /tmp/rsync/source -type f -mtime -31 | rsync -rcvh /tmp/rsync/sourc
/bin/rsync --remove-source-files --files-from="<(find /tmp/rsync/source -type f -mtime -31 -print0)" /tmp/rsync/source /tmp/rsync/destination
试过了,这对我有好处
find /tmp/rsync/source -type f -mtime -31 | rsync -rcvh /tmp/rsync/source/ /tmp/rsync/destination/ --dry-run
删除实际执行的干运行,因为我被迫使用一个预先存在的脚本,该脚本正在“{”括号中进行解析,并且在rsync脚本无法使用上述解决方案之前,您无法运行命令 但是,我能够使用以下方法使其工作:
/bin/rsync --recursive --remove-source-files `find /tmp/rsync/source -type f -mtime -31` /tmp/rsync/destination
请您添加
find/tmp/rsync/source-type f-mtime-31
(可能只有几行)的输出好吗?我已经添加了上面查找的输出。这似乎完全忽略了查找的结果。
find /tmp/rsync/source -type f -mtime -31 | rsync -rcvh /tmp/rsync/source/ /tmp/rsync/destination/ --dry-run
/bin/rsync --recursive --remove-source-files `find /tmp/rsync/source -type f -mtime -31` /tmp/rsync/destination