When the Unix Support Group (development organization at Bell Labs) formalized everything, they gave it a long SCCS header, as they did every other file, and then needed to add "exit 0" at the end. The file was therefore infinitely larger than before.
-
-
Show this thread
-
At some point, somewhere (not sure where) it was decided this was poor engineering, probably because the shell spends time reading that big SCCS header as a comment one byte at a time.
Show this thread -
(It probably became a shell builtin somewhere along the line too, but that's for someone else to study.)
Show this thread -
The command moved to /usr/bin/true. I don't know when, where and especially why.
Show this thread -
Eventually to avoid the unbearable overhead of executing a comment that shouldn't be there at all, someone rewrote true as a C program. What was once an empty file is now a non-portable executable binary compiled from C.
Show this thread -
This is why we can't have good software. This program could literally have been an empty file, a nothing at all, a name capturing the essence perfectly.
Show this thread -
But the inexorable forces of improvement dictate we can't accept that, so here we are: % file /usr/bin/true /usr/bin/true: Mach-O 64-bit executable x86_64 % Instead of: % file true true: empty % true % echo $? 0 %
Show this thread
End of conversation
New conversation -
-
-
Hi this is the unroll you asked for: https://threadreaderapp.com/thread/966896123548872705.html … Thank you to ask me for help. It's a pleasure to help
End of conversation
New conversation -
-
Wait for the systemd replacement

-
systemd-truthd. Returns true unless your hostname includes a number.
End of conversation
New conversation -
-
-
In Python 2, "while 1:" is optimized by the compiler whereas "while True:" evaluates "True" variable at each iteration. True can technically be modified (ex: True=False). In Python 3, True became a keywork and so is optimized too.
-
- 1 more reply
New conversation -
-
-
Eyes opened to the emptiness of /bin/true via snark at an ancient Usenix during convo re: releasing source code, when one wag quipped s/t like “well, what about the source to /bin/true, will the lawyers clear that?”
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
On some old systems replacing /usr/bin/perl with an empty file results in a big improvement
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
looking at the sauce https://git.io/true.c it seems like ~25% of the code exists simply to support the --help and --version flags
-
Why the hell does anybody need help and version flags?
-
Need to find out when true is true, of course!
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.