4 ms·
xargs cannot replace {} with a lot of arguments, so if mv did not have --target-directory, then xargs would have to do: find ... | xargs -0 -i {} mv {} ~/Pi
by tange 16y ago
xargs cannot replace {} with a lot of arguments, so if mv did not have --target-directory, then xargs would have to do:
find ... | xargs -0 -i {} mv {} ~/Pictures
which would run one mv per file.
GNU Parallel http://www.gnu.org/software/parallel/ http://www.gnu.org/software/parallel/ allows for replacing {} with multiple arguments. So this would do the right thing:
find ... | parallel -X -0 mv {} ~/Pictures
GNU Parallel is useful for many other applications. Watch the intro video to learn more: http://www.youtube.com/watch?v=OpaiGYxkSuQ http://www.youtube.com/watch?v=OpaiGYxkSuQ