Use -print0
instead of -print
on the find
command, and the xargs -0
(or --null
) option - then NULs will be used as separators rather than newlines and spaces.
find ./dir -type f -iname "*.t[argz]*[bz2]" -print0 | xargs --null mv --target-directory=dir
martin clayton
2010-01-07 19:09:36