I was just poking around in /usr/bin and I found an ELF binary file called [
. /usr/bin/[
. I have never heard of this file and my first thought was that it was a clever way of hiding a program, possibly a trojan. However it's present on all my CentOS servers and seems to have no manual entry. I can hazard a guess as to what it is but I was looking for a more authoritative answer...
It's an alternative form of the 'test' command. Mostly used in scripts.
i.e.
It's what you call when you are using something like
in a shell script (but most shells have it as a buildin this days). man test should give you the docs.
As others pointed out,
[
is the shell's condition evaluation utility - test.In fact, there is a manual page for that!
should give you more details about the opening square bracket.
Btw, in OS X,
[
is located in/bin/[
:)