[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] command fails thru xargs but succeeds from shell prompt
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