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

标签 linux shell unix

我是系统管理员,我被要求运行一个 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/

相关文章:

macos - svn: E175002: 无法连接到 URL 上的存储库

linux - 使用 PHP 将 .wma 转换为 .flac?可能的?

linux - 根据文件输入执行不同功能的 Shell 脚本

linux - 在用户选择的文件中查找单词的 Shell 脚本

linux - 如何使用 unix 命令将文本文件中的列打印为按行?

linux - 从 Shell 中的目录连接大量选择性文件

c - shmat() 为不同的程序返回不同的地址,所有程序都具有相同的共享内存

java - 在 IntelliJ Idea 中,我的应用程序可以运行,但作为 jar 运行——不是因为 "Error: Could not find or load main class"

linux - saltstack : is there a way to stop updating cron files every time state. highstate 运行

linux - 如何使用退出配置文件 ssh 登录系统