The Collapse of the Unix Philosophy
&gt; Some people think that UNIX is great and perfect<p>&quot;...great and perfect&quot; is a strawman. Whether &quot;some people&quot; think that is irrelevant.<p>Some of this article is interesting, but the fact of the matter is 40-year-old systems have signs of being 40 years old. If &quot;fixing&quot; everything were easy, it&#x27;d be done. Tabs in Makefiles throw off the uninitiated for 10 minutes, then they learn, shrug and move on. These scars and stories are part of the package.<p>Reading further, some of this is just incorrect...<p>&gt;That’s not to mention the fact that critical UNIX files (such as &#x2F;etc&#x2F;passwd) that are read upon every (!) call, say, ls -l, are plain text files. The system reads and parses these files again and again, after every single call!<p>Not on my system.<p>&gt; It would be much better to use a binary format. Or a database.<p>On my system, it is ( running &quot;ls -ld .&quot;):<p><pre><code>  kamloops$ uname -a
  NetBSD kamloops 7.99.64 NetBSD 7.99.64 (GENERIC) #26: Thu Mar  2 07:15:26 PST 2017  root@kamloops:&#x2F;usr&#x2F;src&#x2F;sys&#x2F;arch&#x2F;amd64&#x2F;compile&#x2F;obj&#x2F;GENERIC amd64

  kamloops# dtrace -x nolibs -n &#x27;:syscall::open:entry &#x2F;execname == &quot;ls&quot; &#x2F; { printf(&quot;%s -%s&quot;, execname, copyinstr(arg0));}&#x27;
  dtrace: description &#x27;:syscall::open:entry &#x27; matched 1 probe
  CPU     ID                    FUNCTION:NAME
    0     14                       open:entry ls -&#x2F;etc&#x2F;ld.so.conf
    0     14                       open:entry ls -&#x2F;lib&#x2F;libutil.so.7
    0     14                       open:entry ls -&#x2F;lib&#x2F;libc.so.12
    0     14                       open:entry ls -.
    0     14                       open:entry ls -&#x2F;etc&#x2F;nsswitch.conf
    0     14                       open:entry ls -&#x2F;lib&#x2F;nss_compat.so.0
    0     14                       open:entry ls -&#x2F;usr&#x2F;lib&#x2F;nss_compat.so.0
    0     14                       open:entry ls -&#x2F;lib&#x2F;nss_nis.so.0
    0     14                       open:entry ls -&#x2F;usr&#x2F;lib&#x2F;nss_nis.so.0
    0     14                       open:entry ls -&#x2F;lib&#x2F;nss_files.so.0
    0     14                       open:entry ls -&#x2F;usr&#x2F;lib&#x2F;nss_files.so.0
    0     14                       open:entry ls -&#x2F;lib&#x2F;nss_dns.so.0
    0     14                       open:entry ls -&#x2F;usr&#x2F;lib&#x2F;nss_dns.so.0
    0     14                       open:entry ls -&#x2F;etc&#x2F;pwd.db
    0     14                       open:entry ls -&#x2F;etc&#x2F;group
    0     14                       open:entry ls -&#x2F;etc&#x2F;localtime
    0     14                       open:entry ls -&#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;posixrules

  kamloops# file &#x2F;etc&#x2F;pwd.db
  &#x2F;etc&#x2F;pwd.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
</code></pre>
Now, I see that &#x2F;etc&#x2F;group -is- a plain file. This could get the same treatment as &#x2F;etc&#x2F;passwd if it becomes a burden. In the meantime, if it&#x27;s a performance bottleneck, make a memoizing function to lookup groups and use a &#x27;-n&#x27; switch to ls. Article is probably mostly important as the author thinking deeply about Unix, and part of the developmental process of the user.<p>...All the bluster (some of which is interesting), then at the end walks it back:<p>&gt; So, I do not want to say that UNIX – is a bad system. I’m just drawing your attention to the fact that it has tons of drawbacks, just like other systems do. I also do not cancel the “UNIX philosophy”, just trying to say that it’s not an absolute.<p>Shame about the title... But maybe that&#x27;s what landed it here on HN (?)<p>Edit: explain the &quot;ls&quot; command actually run.