什么是/ bin / true? [英] What is /bin/true?

查看:151
本文介绍了什么是/ bin / true?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Linux系统上, / bin / true 是什么?

On a Linux system, what is /bin/true? What is it used for?

推荐答案

/ bin / true 是什么?返回0(shell中的真值)的命令。

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

其目的是在shell脚本中通常使用诸如 true之类的地方使用,但外壳程序只需要运行命令即可。

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 与之相反,它返回非零(shell中的一个假值)。

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

这篇关于什么是/ bin / true?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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