Date: Sat, 2 Apr 2005 05:07:36 -0500 From: David Schultz <das@FreeBSD.ORG> To: Bruce Evans <bde@zeta.org.au> Cc: standards@FreeBSD.ORG Subject: Re: Patch for cp(1) Message-ID: <20050402100736.GA53369@VARK.MIT.EDU> In-Reply-To: <20050402172651.T1084@epsplex.bde.org> References: <20050330181904.16519571@mobile.pittgoth.com> <20050401191850.Q24028@delplex.bde.org> <200504011517.j31FHxTO084986@khavrinen.lcs.mit.edu> <20050402015901.K24966@delplex.bde.org> <20050401172207.GA23665@VARK.MIT.EDU> <20050402172651.T1084@epsplex.bde.org>
index | next in thread | previous in thread | raw e-mail
On Sat, Apr 02, 2005, Bruce Evans wrote: > On Fri, 1 Apr 2005, David Schultz wrote: > > >On Sat, Apr 02, 2005, Bruce Evans wrote: > >>-r is the same as -R under Linux (linux_base_8), and it isn't even > >>deprecated > >>in cp --help at least, so it won't go away, and fingers will be trained to > >>use it in preference to -R, for at least another 20 years. > > > >Isn't that an argument *for* Tom's patch? In any case, I think > > Of course not. It is an argument for removing -r. > > NetBSD hasn't changed the behaviour of -r. > > >the argument about old programs is bogus, because there are > >undoubtedly more scripts that assume the Linux behavior than there > >are pre-4.2BSD scripts out there. > > Probably not many running on BSD systems, since if they assume Linux > semantics then they won't work except on directories and regular files. > > >Furthermore, are there situations where -r and -R differ such that > >-r would behave reasonably? If it's the case that every time > > As I said, the main case where cp -r gives useful behaviour is for > symlinks, where you actually want to follow symlinks but don't know > about cp -RL. As (I think) Tom meant to suggest in his last message, -r could be made an alias for -RL. That would result in behavior less surprising than to most people than either -r's current behavior or removing -r entirely. Do you agree? > BTW, there are several utilities whose support for tree walks is deficient > due to their only having a -r flag and not having caught up with the 13+ > year old -RHLP flags. diff is the most important one. What I really want is a grep -R that understands how to skip special files. Actually, grep -R already exists, but it's just an alias for -r. You have to say 'grep -D skip -R', which I never remember until I've drummed my fingers on the keyboard for a while waiting for grep to finish. Actually, I think I'll go make an alias now...home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050402100736.GA53369>
