True and false (commands)

true
Initial releaseJanuary 1979 (1979-01)
Operating systemUnix and Unix-like
PlatformCross-platform
TypeCommand

In Unix-like operating systems, true and false are commands whose only function is to always return with a predetermined exit status. Programmers and scripts often use the exit status of a command to assess success (exit status zero) or failure (non-zero) of the command. The true and false commands represent the logical values of command success, because true returns 0, and false returns 1.[Note 1]
Cite error: There are <ref group=Note> tags on this page, but the references will not show without a {{reflist|group=Note}} template (see the help page).


© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search