bug-coreutils
[Top][All Lists]
Advanced

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

Re: cp command


From: wallace_fu
Subject: Re: cp command
Date: Thu, 25 Oct 2007 14:47:14 +1000


Yes, it must be an alias. When I use `\cp -f " and it did not warn for
overwrite. I am using Fedora 7. Thanks for your help, I thought it is a
bug.

Regards,

Wallace Fu




                                                                           
             Eric Blake                                                    
             <address@hidden>                                                
                                                                        To 
             25/10/2007 11:12          address@hidden              
             AM                                                         cc 
                                       address@hidden               
                                                                   Subject 
                                       Re: cp command                      
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




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

According to address@hidden on 10/24/2007 6:55 PM:
> cp (GNU coreutils) 6.9
>
> When use with -f  option, it warns of overwriting existing file.  The
same
> option in version (cp (coreutils) 4.5.3) overwrite exist file with no
> warning. There is no option (I can find) to overwrite existing file
without
> warning.

Are you sure you aren't using an alias for cp which also enabled the -i
option?  POSIX does not allow plain 'cp -f' to prompt [1], but requires
'cp -i -f' to do so.  If it is the case of an alias, you could always use
'\cp -f'.  Personally, I hate systems where cp is prealiased to 'cp -i',
because it encourages laziness on that system, then accidents on other
systems where the non-standard alias is no longer present.

[1] http://www.opengroup.org/onlinepubs/009695399/utilities/cp.html

- --
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

iD8DBQFHH+2L84KuGfSFAYARAlVJAJ9jGT28TfC+Xin1eHp4bXbNR+Il5QCeMyoL
79c8jjETNCTj9LDA7ZONJjU=
=Zm3s
-----END PGP SIGNATURE-----






reply via email to

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