[ale] command fails thru xargs but succeeds from shell prompt

Brian Pitts brian at polibyte.com
Sat Jan 29 20:31:38 EST 2011


On 01/29/2011 03:43 PM, Mark Heiges wrote:
> or use find's --print0 with xarg's -0 options.
> 
>   find Video/* -maxdepth 0 -type d -print0  | xargs -0 -tn1 -I"{}" mv - 
> v {} /alt/video/

Or use find's exec option rather than xargs.

This would run one mv command for each directory, like what you're doing
with -n1.

find Video/* -maxdepth 0 -type d -exec mv '{}' /alt/video ';'

This would run one mv command for all the directories, like xargs
behaves by default.

find Video/* -maxdepth 0 -type d -exec mv '{}' /alt/video '+'

-- 
All the best,
Brian Pitts


More information about the Ale mailing list