from Hacker News

Why is /usr/bin/test 4kiB smaller than /usr/bin/[?

by fomine3 on 6/28/24, 12:09 PM with 2 comments

  • by pixelbeat on 6/28/24, 9:35 PM

    One might be wondering why 'test' and '[' are separate binaries at all. This is to give maximum flexibility wrt copying binaries etc. Note one can build coreutils like busybox as a single binary, by just `./configure --enable-single-binary` at build time. This is already available as an option on Fedora at least through the coreutils-single (1.2MB) package.
  • by sandywaffles on 6/28/24, 12:28 PM

    I won't spoil the reason, but I have to say it's answers like the one given that make me feel like GNU coreutils is essentially decades of hacks thrown together haphazardly in a bunch of loosely related and begrudgingly coordinating pieces of software. I enjoy these code spelunking articles though!