4 ms·
The Unix command /bin/true (do nothing, exit with code zero) can be implemented as an empty file. When it's run, the kernel doesn't recognize it as binary code,
by liw 10y ago
The Unix command /bin/true (do nothing, exit with code zero) can be implemented as an empty file. When it's run, the kernel doesn't recognize it as binary code, so it gives it to /bin/sh to run.
There's at least two bugs in a zero-byte implementation of /bin/true: it's too slow and it uses too much memory.