3 ms·
I wonder how long /usr/bin/true source is.
by smsm42 11y ago
I wonder how long /usr/bin/true source is.
- Havvy 11y agoOn Linux, it's 30ish lines, with half of those there to make false.c able to reuse some code. (I know, it's stupid.) In OpenBSD, it's 3 LoC IIRC.
- dalke 11y agoOn at least one OS I worked with, it was 0 bytes long because /bin/sh on an empty file returns true. (I think that was IRIX 4.x.) OTOH, that's slower than the executable from a 3 LoC do-nothing program.
- cjs2 11y agoLonger than one might think... http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/true.c http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/true...