HomeFreeBSD

ls: Improve POSIX compatibility for -g and -n.

Description

ls: Improve POSIX compatibility for -g and -n.

  • Change -g (ignored for BSD 4.3 compatibility since BSD 4.4) to use POSIX semantics of implying -l but omitting the owner's name.
  • Change -n to imply -l.

The -o option remains unchanged (POSIX defines -o as a complement to
-g that implies -l but omits group names whereas BSD defines -o to add
file flags to -l). This compromise is the same used by both NetBSD
and OpenBSD.

PR: 70813
Reviewed by: jhb, Pau Amma <pauamma@gundo.com>
Co-authored-by: John Baldwin <jhb@FreeBSD.org>
Differential Revision: https://reviews.freebsd.org/D34747

Details

Provenance
minsoochoo0122_proton.meAuthored on Jul 18 2023, 4:49 PM
jhbCommitted on Jul 18 2023, 5:03 PM
Reviewer
jhb
Differential Revision
D34747: ls(1): Change -g and make -n imply -l to implement POSIX
Parents
rGd5e2d0f140ce: openssh: document a locally-applied workaround
Branches
Unknown
Tags
Unknown