Exclude directory in recursive copy

Exclude directory in recursive copy

am 13.11.2007 14:32:52 von Kenneth Brun Nielsen

How can I (easily) exclude a directory ("CVS") from a recursive copy?

The executed command is:
cp -vur sourcedirectory .

Best regards,
Kenneth

Re: Exclude directory in recursive copy

am 13.11.2007 15:12:47 von Scott McMillan

On Tue, 13 Nov 2007 13:32:52 -0000, Kenneth Brun Nielsen
wrote:

>How can I (easily) exclude a directory ("CVS") from a recursive copy?
>
>The executed command is:
>cp -vur sourcedirectory .
>
>Best regards,
>Kenneth

Can you use rsync? Something like

rsync -av --exclude=CVS source_dir dest_dir


Scott McMillan

Re: Exclude directory in recursive copy

am 13.11.2007 16:31:46 von bodman

Le Tue, 13 Nov 2007 13:32:52 +0000, Kenneth Brun Nielsen a écrit :

> How can I (easily) exclude a directory ("CVS") from a recursive copy?
>
> The executed command is:
> cp -vur sourcedirectory .
>
> Best regards,
> Kenneth

this should work :

find source/ -type f -exec cp {} . \;

bodman

Re: Exclude directory in recursive copy

am 13.11.2007 21:06:47 von Bill Marcum

On 2007-11-13, bodman wrote:
> Le Tue, 13 Nov 2007 13:32:52 +0000, Kenneth Brun Nielsen a écrit :
>
>> How can I (easily) exclude a directory ("CVS") from a recursive copy?
>>
>> The executed command is:
>> cp -vur sourcedirectory .
>>
>> Best regards,
>> Kenneth
>
> this should work :
>
> find source/ -type f -exec cp {} . \;
>
That would copy all the files into one directory, and wouldn't exclude
any files.

Re: Exclude directory in recursive copy

am 14.11.2007 05:37:52 von bodman

Le Tue, 13 Nov 2007 15:06:47 -0500, Bill Marcum a écrit :

> On 2007-11-13, bodman wrote:
>> Le Tue, 13 Nov 2007 13:32:52 +0000, Kenneth Brun Nielsen a écrit :
>>
>>> How can I (easily) exclude a directory ("CVS") from a recursive copy?
>>>
>>> The executed command is:
>>> cp -vur sourcedirectory .
>>>
>>> Best regards,
>>> Kenneth
>>
>> this should work :
>>
>> find source/ -type f -exec cp {} . \;
>>
> That would copy all the files into one directory, and wouldn't exclude
> any files.

right, bad reading :)