Nohup
nohup This command is a less common command in Linux , which is tantamount to declaring the current command as a daemon , even if the current account exits the program or continues to run , the specific examples below illustrate
The following 0,1,2 is not a normal string inside a 0, is a bash command, indicating the state of the program running a number, they are often combined with the
0 Stdin_fileno Standard input
1 stdout_fileno standard output
2 Stderr_fileno standard error
& equal to; Let Bash run in the background
> Redirection
2>&1 represents 2 output redirection equivalent to 1
The system default value is 1, that is, the error output is equivalent to the standard output, so around the fact that the error is output to the console ....
1>/dev/null indicates that standard output is redirected to an empty device file, which is plainly not displaying any information
[Root@localhost data]# nohup./cliserver.sh 2>&1 &
The above command means to execute the current directory cliserver.sh, output to the current output stream (which can be understood as the console) when an error occurs, and the immediate current user exit will continue to take effect.
Using the command, look back.