/usr/bin/[

Asked by oddemirci

Just because of curiosity:

What is the file:

'/usr/bin/['

It seems to be binary, but I cannot run it. Also, I could not find anything related to this file on the web.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu bash Edit question
Assignee:
No assignee Edit question
Solved by:
Brian Gallew
Solved:
Last query:
Last reply:
Revision history for this message
Best Brian Gallew (geek+work) said :
#1

[ is an alias for "test" and is frequently used in shell scripts. When you see "if [ -e /some/file ]" the "[" in there is really running that file unless it happens to be a shell built-in.

Revision history for this message
Matt Perry (mp) said :
#2

It's part of the GNU coreutils package. That particular program is associated with the 'test' program. Run 'man test' to see more.

Revision history for this message
oddemirci (oddemirci) said :
#3

Hi Brian, thank you for the answer. I am new to Linux and learning details every day.

Interestingly googling "/usr/bin/[" does not give anything, neither does "if [ -e". Anyway, thank you.

Revision history for this message
oddemirci (oddemirci) said :
#4

Hi Matt, thank you for the reference for "man test". It was helpful.