Meaning of exit status 1 returned by linux command

前端 未结 2 461
春和景丽
春和景丽 2020-12-09 15:36

What is meaning of exit status 1 returned by linux command? Like 127 exit status indicates \"command not found\".

I have visited http://linux.die.net/abs-guide/exitc

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-09 15:52

    The only general convention is that a zero exit status signifies success, whereas any non-zero exit status is a failure.

    Many -- but certainly not all -- command-line tools return exit code 1 for syntax error, i.e. you had too few arguments or an invalid option.

    Many -- but, alas, not all -- command-line tools have a manual page. By convention, it should document the exit codes of the program, but many do not.

提交回复
热议问题