tags:

views:

462

answers:

2
+3  Q: 

what is /bin/true

All,

In linux what is /bin/true

Thanks.....

A: 

From the man page:

true - do nothing, successfully

true returns a status 0.

Somehow I find that is funny. Successfully do nothing, lol.
SyaZ
+6  A: 

/bin/true is a command that returns 0 (a truth value in the shell).

Its purpose is to use in places in a shell script where you would normally use a literal such as "true" in a programming language, but where the shell will only take a command to run.

/bin/false is the opposite that non-zero (a false value in the shell).

camh