bug-coreutils
[Top][All Lists]
Advanced

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

Re: Interactivity (-i) and non-interactivity


From: Eric Blake
Subject: Re: Interactivity (-i) and non-interactivity
Date: Sun, 11 Mar 2007 14:49:27 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.4.666

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

According to Jan Engelhardt on 3/11/2007 10:28 AM:
> Hello,
> 
> 
> by default, coreutils cp will overwrite a file. Hence I put in
> 
>       alias cp='/bin/cp -i'

This list tends to frown on that practice.  Individually, you can set
aliases to whatever you like.  But system-wide, you are just setting your
users up to expect it, perhaps unknowingly, and it tends to come back and
haunt them when they swap to a different setup.  But I don't manage your
system, so I can't force you to change your opinion.

> 
> "cp" on the other hand is missing this. The following patch adds it in.

Sorry, but POSIX requires that 'cp -i' and 'cp -f' are orthogonal, and
that neither overrides the other.  This patch is wrong because it goes
against POSIX.
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

iD8DBQFF9GtX84KuGfSFAYARAlnzAKC/hGRQsG5anzFk6tiQvfGT9vTj0wCgoWmT
zU6pomR+zB8yKa/BQQJJ6OY=
=8SmW
-----END PGP SIGNATURE-----




reply via email to

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