On 2019/05/23 22:58, Ingo Schwarze wrote:
> Hi Tracey,
> 
> Tracey Emery wrote on Thu, May 23, 2019 at 02:35:10PM -0600:
> 
> > Attached is a proposed diff for cp(1). It adds the -l (hard link)
> > and -s (symlink) options.
> 
> I don't like that.  That's exactly what can be done with ln(1) in a
> standard way.  There is no value in making every tool do everything -
> quite to that contrary, that only causes gratuitous complication and
> confusion.

It can be done, but I think the main point of this cp(1) option is that
it works with -r. You can also do that with a combination of ln(1) and
find(1), but it's more awkward, and there's potentially a lot of fork
overhead if copying a deep tree.

> > These options are available in GNU cp, FreeBSD cp,
> > and the -l option is at least in NetBSD and Dragonfly.
> > 
> > I needed the -l option to use the system cp for rsnapshots, instead of
> > their native_cl_al function. Hopefully, this will speed up my backups.
> 
> If the rsnapshots uses such options, i think you should send patches
> to the rsnapshots project instead.  Tell them to use POSIX features
> instead of relying on pointless GNUisms.

I don't use rsnapshot but from a quick glance it appears to be a non-
default option that they only suggest using on Linux. (Rather than
modifying /bin/cp, an alternative would be to install coreutils and
point it at gcp).

Reply via email to