What is '**&**' symbol at the end in the command for?

What is '&' symbol at the the end in the command for?

nohup /server1/scripts/xyz.sh $1 2> nohup.out&

2

2 Answers

The & character is a control operator in the shell. It causes to execute the process in the background. That means that the process has no read access to the terminal. Only a foreground process has. But, it can still write its output to the terminal

If you started a process in the background with:

process &

Then you can get him back to the foreground with:

fg

And you can interact with the process again.

It moved the process to the background.

See your shell documentation and search for job control.

(PS: It is not linux specific).

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like