退出状态1的含义由linux命令retured [英] Meaning of exit status 1 retured by linux command

查看:1037
本文介绍了退出状态1的含义由linux命令retured的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉mi,linux命令返回的退出状态1的含义。像127退出状态表示命令未找到。我访问过 http://linux.die.net/abs-guide/exitcodes.html page,是不是意味着退出状态1没有特殊的意义。

Can anybody tell mi that, 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/exitcodes.html page, does it mean exit status 1 does not have particular special meaning.

推荐答案

零退出状态表示成功,而任何非零退出状态都是失败。

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

许多 - 但肯定不是所有 - 命令行工具返回退出代码1

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.

这篇关于退出状态1的含义由linux命令retured的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆