Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Wednesday March 04 2020, @04:51AM   Printer-friendly
from the get-off-my-lawn dept.

The growth of command line options, 1979-Present

The first of McIlroy's dicta is often paraphrased as "do one thing and do it well", which is shortened from "Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new 'features.'" [ . . . ]

If you open up a manpage for ls on mac, you'll see that it starts with

ls [-ABCFGHLOPRSTUW@abcdefghiklmnopqrstuwx1] [file ...]

That is, the one-letter flags to ls include every lowercase letter except for {jvyz}, 14 uppercase letters, plus @ and 1. That's 22 + 14 + 2 = 38 single-character options alone.

On ubuntu 17, if you read the manpage for coreutils ls, you don't get a nice summary of options, but you'll see that ls has 58 options (including --help and --version).

To see if ls is an aberration or if it's normal to have commands that do this much stuff, we can look at some common commands, sorted by frequency of use.

(see article for interesting table.)

We can see that the number of command line options has dramatically increased over time; entries tend to get darker going to the right (more options) and there are no cases where entries get lighter (fewer options).

McIlroy has long decried the increase in the number of options, size, and general functionality of commands:

Everything was small and my heart sinks for Linux when I see the size [inaudible]. The same utilities that used to fit in eight k[ilobytes] are a meg now. And the manual page, which used to really fit on, which used to really be a manual page, is now a small volume with a thousand options... We used to sit around in the UNIX room saying "what can we throw out? Why is there this option?" It's usually, it's often because there's some deficiency in the basic design -- you didn't really hit the right design point. Instead of putting in an option, figure out why, what was forcing you to add that option. This viewpoint, which was imposed partly because there was very small hardware ... has been lost and we're not better off for it.

[ . . . . ] Another reason commands now have more options is that people have added convenience flags for functionality that could have been done by cobbling together a series of commands. These go all the way back to v7 unix, where ls has an option to reverse the sort order (which could have been done by passing the output to tac).

Over time, more convenience options have been added. For example, to pick a command that originally has zero options, mv can move and create a backup (three options; two are different ways to specify a backup, one of which takes an argument and the other of which takes zero explicit arguments and reads an implicit argument from the VERSION_CONTROL environment variable; one option allows overriding the default backup suffix). mv now also has options to never overwrite and to only overwrite if the file is newer.

mkdir is another program that used to have no options where, excluding security things for SELinux or SMACK as well as help and version options, the added options are convenience flags: setting the permissions of the new directory and making parent directories if they don't exist.

[ . . . ] unlike with a GUI, adding these options doesn't clutter up the interface.

(emphasis added)

No worry, systemd will guide us back to the true Unix Microsoft way.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by barbara hudson on Wednesday March 04 2020, @05:03AM (12 children)

    by barbara hudson (6443) <barbara.Jane.hudson@icloud.com> on Wednesday March 04 2020, @05:03AM (#966357) Journal
    Just read Charles Petzold's book "Programming Windows 3.2." All the core concepts are there.
    --
    SoylentNews is social media. Says so right in the slogan. Soylentnews is people, not tech.
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by coolgopher on Wednesday March 04 2020, @06:22AM (11 children)

    by coolgopher (1157) on Wednesday March 04 2020, @06:22AM (#966383)

    His "Programming Windows 95" was a good read as I recall it.

    That said, I still don't want a portion of Windows with my Linux, thank you very much.

    • (Score: 2) by barbara hudson on Wednesday March 04 2020, @12:20PM (10 children)

      by barbara hudson (6443) <barbara.Jane.hudson@icloud.com> on Wednesday March 04 2020, @12:20PM (#966438) Journal
      You'll have no choice. Wait until you get to enjoy all the stupidity of homed. Linux is going where the companies paying the bills want it to go.
      --
      SoylentNews is social media. Says so right in the slogan. Soylentnews is people, not tech.
      • (Score: 2) by DannyB on Wednesday March 04 2020, @05:47PM (2 children)

        by DannyB (5839) Subscriber Badge on Wednesday March 04 2020, @05:47PM (#966568) Journal

        In a large sense yes. On an individual level, no. And there are a lot of individuals. Remember the rise of open source vs the mighty unassailable Microsoft. Or the rise of these pesky "microcomputer" toy things vs the mighty IBM.

        For the most part, I expect the companies paying the bills to make choices based on what makes economic sense. But insanity sometimes prevails. (not intending to inject politics. /sarc)

        --
        To transfer files: right-click on file, pick Copy. Unplug mouse, plug mouse into other computer. Right-click, paste.
        • (Score: 2) by barbara hudson on Wednesday March 04 2020, @07:30PM (1 child)

          by barbara hudson (6443) <barbara.Jane.hudson@icloud.com> on Wednesday March 04 2020, @07:30PM (#966649) Journal
          Who's calling the shots for Linux development ? IBM, and to a lesser extent, Microsoft. Welcome to the new bosses, same as the old bosses.
          --
          SoylentNews is social media. Says so right in the slogan. Soylentnews is people, not tech.
          • (Score: -1, Troll) by Anonymous Coward on Wednesday March 04 2020, @09:14PM

            by Anonymous Coward on Wednesday March 04 2020, @09:14PM (#966695)

            Why is linus such a fag?

      • (Score: 2) by coolgopher on Thursday March 05 2020, @01:12AM (4 children)

        by coolgopher (1157) on Thursday March 05 2020, @01:12AM (#966769)

        Meh. If I have to I'll build from scratch or via buildroot. Or go back to FreeBSD. And if I *really* have to, I'll fork the kernel and stick to old and/or open hardware (RISC-V, hello!).

        In the meantime I'll keep pointing people at the excellent work done by e.g. Devuan [devuan.org] to keep stuff systemd free.

        • (Score: 2) by barbara hudson on Thursday March 05 2020, @02:01AM (3 children)

          by barbara hudson (6443) <barbara.Jane.hudson@icloud.com> on Thursday March 05 2020, @02:01AM (#966794) Journal
          It's not just systemd. Have you counted how many processes are running after startup on a Linux box that isn't even running any servers? Over 200 smells like bloatware.
          --
          SoylentNews is social media. Says so right in the slogan. Soylentnews is people, not tech.
          • (Score: 2) by coolgopher on Thursday March 05 2020, @03:35AM (2 children)

            by coolgopher (1157) on Thursday March 05 2020, @03:35AM (#966820)

            I have now. 27, not counting my shells.

            • (Score: 2) by barbara hudson on Thursday March 05 2020, @04:48PM (1 child)

              by barbara hudson (6443) <barbara.Jane.hudson@icloud.com> on Thursday March 05 2020, @04:48PM (#966978) Journal
              You have way more than that . Become root and run ps ax. Ubuntu has over 200, earlier versions of opensuse and Fedora had over 150 a decade ago.
              --
              SoylentNews is social media. Says so right in the slogan. Soylentnews is people, not tech.
              • (Score: 2) by coolgopher on Friday March 06 2020, @01:28AM

                by coolgopher (1157) on Friday March 06 2020, @01:28AM (#967195)

                Well, this ain't Ubuntu. This is a system which uses runit [smarden.org] as init, and I haven't installed a bunch of unnecessary junk on this system.
                In my process list there are 53 kernel threads listed, 12 daemons, 10 service monitors (runsv), 4 supporting log daemons, and the init process. And if you're curious why there are fewer service monitors than daemons, it's the two dhclient processes that aren't monitored.

      • (Score: 0) by Anonymous Coward on Thursday March 05 2020, @02:30AM

        by Anonymous Coward on Thursday March 05 2020, @02:30AM (#966800)

        Linux is going where the companies paying the bills want it to go.

        This is natural and logical. As a manager I want productivity and my sysadmins being the hubris-driven creatures they are want to type less and do more.
        So eventually it is easier for all concerned to have cp have a new option "-r" than the magical incantations of old.. something like:
        find /path -some-magic-markers-and-options-to-select-files-or-folders | cpio another-series-of-pretty-obscure-magic-flags

      • (Score: 0) by Anonymous Coward on Thursday March 05 2020, @06:13PM

        by Anonymous Coward on Thursday March 05 2020, @06:13PM (#967020)

        You'll have no choice. Wait until you get to enjoy all the stupidity of homed.

        That'll wind up being officially referred to as "homie-D".