output.log & 所以这个命令是以&符号结尾的,有什么特殊意义吗? 我对 sh-6ren">
gpt4 book ai didi

linux - linux命令末尾的 "&"是什么意思?

转载 作者:IT老高 更新时间:2023-10-28 12:26:38 24 4
gpt4 key购买 nike

我是系统管理员,我被要求运行一个 linux 脚本来清理系统。

命令是这样的:

perl script.pl > output.log &

所以这个命令是以&符号结尾的,有什么特殊意义吗?

我对 shell 有基本的了解,但我以前从未见过。

最佳答案

& 使命令在后台运行。

来自man bash:

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 - linux命令末尾的 "&"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13338870/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com