nohup sh 123.sh 1 >/dev/null 2>&1 &
时间: 2023-03-02 20:54:41 浏览: 196
&1 &
This command runs the shell script "123.sh" with an argument of "1" in the background using "nohup" (no hang-up), redirects standard output to "/dev/null" (to discard any output), and redirects standard error to standard output (to avoid separating error messages from the standard output). The "&" symbol at the end is used to run the command in the background, allowing you to continue using the terminal.
The purpose of "nohup" is to allow a process to continue running even if the terminal session is ended. The standard output and error streams are redirected to "/dev/null" to discard any output that the script might generate.
In summary, this command runs the shell script "123.sh" in the background, discards any output, and merges standard error with standard output, making it convenient for long-running processes.
阅读全文
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)