bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cp alphabetical


From: Andrés Ghigliazza
Subject: Re: cp alphabetical
Date: Wed, 20 Jun 2007 14:01:03 -0300

I will test it later.

Pádraig, Matthew, thanks very much.


On 6/20/07, Matthew Woehlke <address@hidden> wrote:
Pádraig Brady wrote:
> Andrés Ghigliazza wrote:
>> It would copy all the albums in alphabetical order, to the same target
>> directory!!. I am interested in having the same directories structure
>> in the player too, i.e: artist1/album1, etc.
>
> untested:
>
> find /src | sort | xargs cp --parents --target-directory=/flash

You beat me to it, but I did test, and it WFM.

Another note:
find /src -print0 | sort -z | xargs -0 cp [...args...]

...won't break if/when your file names have spaces in them.

--
Matthew
"Nobody expects the Spanish Inquisition!" -- Monty Python





reply via email to

[Prev in Thread] Current Thread [Next in Thread]