Re: `ls -1s` doesn't print "total"

Valery Ushakov <[email protected]>
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
On Sun, Nov 03, 2024 at 14:37:11 -0500, Jan Schaumann wrote:

> The fix is trivial (see attached), but I wanted to
> check whether perhaps this was done by intent and
> there's a reason why we're not printing the total when
> using `-1`?

If I had to guess (I'm too lazy to look and it's more fun that way),
I'd say -1 is the option for "the output is meant to read
programmatically" and it's antonym is -C for "the output for human
consumption".  If ls outputs to a pipe it infers -1 automatically
unless -C is specified (cf. "command ls | more").  The total is "for
human consumption" (phrased as "the output is to a terminal"), so when
you specify -1 you turn that off.

-uwe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.