Exclude directory in recursive copy
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
On Tue, 13 Nov 2007 13:32:52 -0000, Kenneth Brun Nielsen
<kenneth.brun.nielsen [at] googlemail.com> 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
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
On 2007-11-13, bodman <bodman [at] wanadoo.fr> 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
Le Tue, 13 Nov 2007 15:06:47 -0500, Bill Marcum a écrit :
> On 2007-11-13, bodman <bodman [at] wanadoo.fr> 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 :)