bug-coreutils
[Top][All Lists]
Advanced

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

Re: exclude option for cp


From: Eric Blake
Subject: Re: exclude option for cp
Date: Sun, 24 Jun 2007 09:30:39 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070509 Thunderbird/1.5.0.12 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please keep replies on the list.  I am not the primary maintainer of
coreutils, so mailing just me will not get anything changed.

According to Francky Leyn on 6/24/2007 9:23 AM:
> Eric Blake wrote:
> According to Francky Leyn on 6/24/2007 2:29 AM:
>  
>>>> I know I can do this
>>>> with find, but it would be much more convenient if cp
>>>> would have an option to exclude files from copying.
>>>>     
> 
> That's the key to it all.  The Unix philosophy is that each utility
> should
> do one thing, and do it well.  There is no need to bloat cp with
> something
> that find can do, when find already does it better.  You have to prove
> that there is something that cannot be done in any other way than cp,
> before it is worth adding it to cp.
> 
>   
>> Ok, I found a reason.
> 
>> I have to copy a file system from a DVD to a new hard disk.
>> For some reason find and cp "hang" on a certain file.
>> I think that file is corrupt on the DVD. I also can't provide
>> you with this example: tar also hangs. If we would have
>> an exclude option, then it would be possible to skip
>> this file. After reading its name, it would be excluded and
>> no further accessed. This way one would be able to skip
>> defects on media.
> 
>>>> Suppose this option would be triggered with -e or --exclude
>>>> I then would be able to specify the copy as:
>>>> cp -rvf -e '*~' -e .scratch
>>>>
>>>> What about the idea?
>>>>
>>>> Is someone willing to implement this?
>>>>     
> 
> If you submit a patch, it will be reviewed.  But the bar for adding new
> features to cp is very high, and no one else will write it for you.
> 
>   
>> I don't start with that. The GNU coding standards are so high, I will
>> never reach them. I must find someone which has this high level of
>> coding. I don't think it is that hard to implement. Someone who knows
>> his way around in the code easilly coud add the desired functionality.

My point is that no one else has been motivated enough to write something
like this, because no one else has seemed to think that such a feature was
missing.  If it is that important to you, posting any patch at all will at
least spur conversation, along with tips on how you can improve your
coding to meet GNU coding standards.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGfo4e84KuGfSFAYARAognAJ9opueGZZjLHVNCLDTKLF6PpnZTfwCgzvUr
oiRhdNcOmGRZn57p7kq71fs=
=M5da
-----END PGP SIGNATURE-----




reply via email to

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