From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 30172 invoked from network); 12 Mar 2020 03:09:53 -0000 Received-SPF: pass (minnie.tuhs.org: domain of minnie.tuhs.org designates 45.79.103.53 as permitted sender) receiver=inbox.vuxu.org; client-ip=45.79.103.53 envelope-from= Received: from unknown (HELO minnie.tuhs.org) (45.79.103.53) by inbox.vuxu.org with ESMTP; 12 Mar 2020 03:09:53 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 651D89BD83; Thu, 12 Mar 2020 13:09:50 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id CD05D9BB47; Thu, 12 Mar 2020 13:09:27 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 1479B9BB47; Thu, 12 Mar 2020 13:09:25 +1000 (AEST) Received: from lax.lemis.com (www.lemis.com [45.32.70.18]) by minnie.tuhs.org (Postfix) with ESMTP id 592879BB46 for ; Thu, 12 Mar 2020 13:09:21 +1000 (AEST) Received: from eureka.lemis.com (aussie-gw.lemis.com [167.179.139.35]) by lax.lemis.com (Postfix) with ESMTP id 7A595280DE; Thu, 12 Mar 2020 03:09:18 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id B88DF263595; Thu, 12 Mar 2020 14:09:17 +1100 (AEDT) Date: Thu, 12 Mar 2020 14:09:17 +1100 From: Greg 'groggy' Lehey To: Steve Nickolas Message-ID: <20200312030917.GJ89512@eureka.lemis.com> References: <202003031815.023IFSlD493028@darkstar.fourwinds.com> <20200311225638.GG89512@eureka.lemis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GBuTPvBEOL0MYPgd" Content-Disposition: inline In-Reply-To: Organization: LEMIS, 29 Stones Road, Dereel, VIC, Australia Phone: +61-3-5309-0418 Mobile: +61-490-494-038. Use only as instructed. WWW-Home-Page: http://www.lemis.com/grog X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 User-Agent: Mutt/1.6.1 (2016-04-27) Subject: Re: [TUHS] Command line options and complexity X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: The Eunuchs Hysterical Society Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --GBuTPvBEOL0MYPgd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wednesday, 11 March 2020 at 20:53:12 -0400, Steve Nickolas wrote: > I went through all the switches defined by POSIX, and figured that > those 26 could be cut down. A brave man to defy POSIX! I wasn't so brave, which is why we have the -y option. > My concept reduced the number of switches from 26 to 9 (FLRadfiln). > Of course, the idea is to be more minimalist than POSIX, so some > people's opinions on what is or isn't necessary may differ from > mine. OK, let's compare notes: > I felt -A was a redundant "almost -a". Arguably -a could go too. The distinction seems arbitrary. > I felt -C and -x were redundant because a tool like column(1) could be > used to do the same job (even though column(1) isn't POSIX). Neither would this ls(1) be. > I felt -H was a redundant "almost -L". No arguments, but I suspect that somebody had a good reason for this distinction, and removing it could cause problems. > I felt -S, -r and -t could be implemented in other ways using sort(1). -S isn't POSIX. And to implement it without an option would mean removing -h. As I mentioned earlier, -t can't be done by a filter without significantly modifying the timestamp output. That was my rationale for the -D option, which allows sorting by an external filter. -r could work. > I felt -c and -u were meaningless, but that's because of the filesystems I > usually work with that do not have functional equivalents. -u for one is > completely useless on VFAT even though it has such timestamps! YMMV. I think this says more about your file systems than about the options. I find both incredibly useful, and there's no easy way to get the information elsewhere. stat(1) would be an option, but then that could replace ls(1) completely. > I felt -g and -o could be replaced by cut(1). -g is already obsolete in FreeBSD (accepted and ignored). -o has already been repurposed (show file flags). > I felt -k wasn't really all that important. Just halve the numbers. Agreed. > I felt -m wasn't really all that important. There's other ways to convert > to that format, no doubt, through filters. Possibly. Certainly I wouldn't miss it. > I felt -p was a redundant "almost -F". OK. > I felt -q could be done just fine with something like tr(1). I think that it could be replaced by -b. "?" isn't really very helpful. > I felt -s was a redundant "kindasorta -l". I can't agree with that, but I've never used it. The only sensible use would appear to be talking about disk blocks, but on FreeBSD at any rate it looks at the BLOCKSIZE environment variable, which I have set to 1048576 (so that utilities will display in MB where appropriate), and that's what -s does too: 2079 -rw-r--r-- 1 grog wheel 2,178,735,915 4 Oct 11:15 Willkommen-bei-den-Honeckers---Spielfilm,-Deutschland-2016-20191003-125200.mp4 That makes it pretty useless. So, any others? -G: Colorized output. I'd be *really* happy to get rid of this, but it's not easy to instate with a filter, so I suppose there are enough people who like it that it will have to stay. -P: Seems only to be there to cancel a -H or -L. -W: "Display whiteouts when scanning directories". I don't even understand what that is. -a: See discussion of -A. --color: Again, no thanks. -f: We haven't really discussed this one. If you want to remove -S, -r and -t, then arguably -f should become the default and be -removed. -n: Make it the default and require a filter to convert group and user numbers to IDs. -y: If we get rid of all sorting, it will no longer be needed. -,: Make the option standard: output numbers with commas every 3 digits. Then this option specification wouldn't be needed. Of course, none of this will happen. But it is interesting to think about it. In particular, options like -g and -o, which are no longer modern. Greg -- Sent from my desktop computer. Finger grog@lemis.com for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft mail program reports problems, please read http://lemis.com/broken-MUA --GBuTPvBEOL0MYPgd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAl5pp90ACgkQIubykFB6QiP42gCdHmT7haPrpvT6viZ09TMnDlP+ 4r0AniXdf16/BBkffK6iTDDgskzg4ICW =uNJ5 -----END PGP SIGNATURE----- --GBuTPvBEOL0MYPgd--