[svlug] Re: [svlug]how to copy a bunch of "." files?

Francis Pinteric linuxdoctor at linux.ca
Thu Apr 27 10:30:26 PDT 2000


On 27-Apr-2000 Ian B MacLure wrote:
>>On Wed, Apr 26, 2000 at 01:25:31PM -0700, Daevid Vincent wrote:
>>  > given a directory with . files in it, how do I copy them all to another
>>  > directory?
>>
>>find . -type f -maxdepth 1 | xargs -i mv '{}' otherdir


Here's a question that I seen a lot of and I' wondering what the advantage is.

When using find, I see a lot of people using xargs when most of the time it
isn't necessary. For example, the above find sequence can be written as:

  find . -type f -maxdepth 1 -exec mv {} otherdir \;

What advantage does xargs provides in cases like this? Just wondering.

>>>--fja->







More information about the svlug mailing list