“&"是什么意思?linux命令的末尾是什么意思? [英] What does "&" at the end of a linux command mean?
本文介绍了“&"是什么意思?linux命令的末尾是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是系统管理员,我被要求运行一个 linux 脚本来清理系统.
I am a system administrator and I have been asked to run a linux script to clean the system.
命令是这样的:
perl script.pl > output.log &
所以这个命令以&
符号结尾,有什么特殊意义吗?
so this command is ending with a &
sign, is there any special significance of it?
我有 shell 的基本知识,但我以前从未见过这个.
I have basic knowledge of shell but I have never seen this before.
推荐答案
&
使命令在后台运行.
来自man bash
:
如果命令被控制操作符&终止,shell在子shell的后台执行命令.外壳做不要等待命令完成,并且返回状态为0.
If a command is terminated by the control operator &, the shell executes the command in the background in a subshell. The shell does not wait for the command to finish, and the return status is 0.
这篇关于“&"是什么意思?linux命令的末尾是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文