Hacker News new | ask | show | jobs
by mywittyname 2669 days ago
Is true a program? I thought it was a command built into the shell.
3 comments

Most shells optimize it to avoid the overhead of spawning a process for something as trivial as that. But yes, it's an actual binary even so, just in case - try `which true`.

https://www.gnu.org/software/coreutils/manual/html_node/true...

It’s /usr/bin/true on Mac, and the OpenBSD source for it is at https://github.com/openbsd/src/blob/master/usr.bin/true/true... .
I don't know what I expected.