据我所知,使用&
命令之后用于在后台运行它。
的例子&
usage: tar -czf file.tar.gz dirname &
但怎么样&&
? (example https://serverfault.com/questions/215179/centos-100-disk-full-how-to-remove-log-files-history-etc#answer-215188)
此外,您还拥有||
这是逻辑或,也是;
这只是一个分隔符,不关心命令之前发生了什么。
$ false || echo "Oops, fail"
Oops, fail
$ true || echo "Will not be printed"
$
$ true && echo "Things went well"
Things went well
$ false && echo "Will not be printed"
$
$ false ; echo "This will always run"
This will always run
有关这方面的一些详细信息可以在这里找到命令列表 http://www.gnu.org/software/bash/manual/bashref.html#Lists在 Bash 手册中。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)