The solutions are:
- The -print0 option of find uses 0-bytes to separate results, instead of spaces and newlines
- The -0 option of xargs tells xargs to look for said 0-bytes
- The -J option of xargs allows us to tell xargs where to put the file names that we feed to it.
pi@raspberrypi ~ $ find . -name 'your*pattern.jpg' -print0 | xargs -J % -0 rsync -aP % user@host:some/dir/
Thanks to redeyeblind for the insightful blog post.
No comments:
Post a Comment