[Bug 45333] New option -r for chown(8) and chgrp(1)

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 29 Oct 2024 15:35:18 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=45333

Oliver Fromme <olli@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olli@FreeBSD.org

--- Comment #6 from Oliver Fromme <olli@FreeBSD.org> ---
(In reply to Garrett Cooper from comment #3)

I'm aware that I submitted this PR about 22 years ago, that's a pretty long
time, but anyway ...

Compatibility with GNU is pretty much irrelevant, IMHO, because we're not
compatible with GNU anyway. The GNU variants of chown(1) and chgrp(1) support
long options, FreeBSD doesn't.  The new feature that I suggested here exists in
the GNU world for a long time; they use the long option --reference, e.g.

chown --reference=foo bar

They don't have a short option for it, so scripts in the Linux world started to
use the long option. So we're not compatible anyway.

I suggested the option -r because we have other tools that use this option for
exactly the same purpose, like touch(1) and truncate(1). It should also be
noted that the option -r is not used by the GNU variants (results in "unknown
option" error message).

-- 
You are receiving this mail because:
You are the assignee for the bug.