[TUHS] Command line options and complexity

Dave Horsfall dave at horsfall.org
Fri Mar 6 07:50:45 AEST 2020

On Wed, 4 Mar 2020, Ken Thompson via TUHS wrote:

> do i get a prize:
> ls -tj
> /bin/ls: illegal option -- j
> usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]

Another candidate for option-cleansing...  Interesting; I get different 
options with the Mac and FreeBSD:


     usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]


     usage: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,] [-D format] [file ...]

So FreeBSD has added up "y,D:" (in getopt(3)-speak); my eyes are burning...

-- Dave

More information about the TUHS mailing list