Get the App
SLTechnology News&Howtos  ›  Servers  › 

The usage of the Linux basic command nohup

Shulou Source: shulou.com Published: 2022-06-01 12:37:42 10月14日 Update

This article introduces the relevant knowledge of "the usage of the Linux basic command nohup". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Nohup

Nohup enables the program to ignore the hang signal and continue to run. It is mounted when the user exits, and nohup ensures that the program continues to run after the user exits. If the standard input is a terminal, redirect it from / dev/null. If the standard output is terminal, append the output to "nohup.out" (if possible), otherwise to "$home/nohup.out". If the standard error is a terminal, redirect it to standard output. To save the output to a file, use "nohup COMMAND > FILE".

The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.

1. Grammar

Nohup cmd

2. List of options

Option

Description

-- help

Show help documentation

-- version

Show command version

3. Examples

Run the find instruction as nohup

[root@localhost ~] # nohup find / weijie/-name * .c / / run find

Nohup: ignore the input and append the output to "nohup.out" / / the result will be saved to the nohup.out file

[root@localhost ~] # cat nohup.out / / View the result

/ weijie/11.c

/ weijie/4.c

/ weijie/2.c

/ weijie/3.c

/ weijie/5.c

/ weijie/1.c

This is the end of the introduction to "the usage of the Linux basic command nohup". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Output command standard run terminal foundation content file more user knowledge program result input utility achievement and then signal can make it difficult. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Xiaomi macOS Shulou Technology Docker