Skip to main content


In today #Linux #shell adventures, did you know that [ is an executable ELF binary provided by coreutils? There's a /usr/bin/[ program in the $PATH on most Linux systems.

Check it out:
which [

alcinnz reshared this.

in reply to Scott Williams 🐧

@Scott Williams 🐧 ...which is usually a symlink to /usr/bin/test, if I'm not mistaken.

Edit: It appears this may no longer be the case.

This entry was edited (7 months ago)
in reply to Jonathan Lamothe

It's not a symlink on Fedora, at least. It's an ELF executable. It very well might be a wrapper on test at the code level, though.
in reply to Scott Williams 🐧

@Scott Williams 🐧 Ah, my source on this was a book I purchased in the 90s. I may well be misremembering, or things may have changed since then.
in reply to Jonathan Lamothe

@Jonathan Lamothe @Scott Williams 🐧 On my system both are their own binaries, and both seem to be different (vbindiff shows differences), but they do the same thing