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

Jan Schaumann <[email protected]>
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
Jan Schaumann <[email protected]> wrote:
> Valery Ushakov <[email protected]> wrote:
> 
> > 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.
> 
> Yeah, that's certainly a possible interpretation.  In
> that case, though, the manual page should say so.

I've just updated the manual page accordingly.

As an aside, GNU ls(1) prints "total" with '-s1';
FreeBSD ls(1) does not; macOS ls(1) prints "total"
with '-1' as well as when not writing to a terminal.

¯\_(ツ)_/¯ 

-Jan
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.