Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Just a quick question that I'm having trouble Googling for some reason.

When I fork a process in bash like this:

$ mything &

And it completes 10 seconds later, it interrupts my terminal like this:

[1]+  Done          mything

Is there a way to disable this? I want to run it in the background but I want it to never come back and tell me anything, ever.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted
  1. disown after forking
  2. Run it in screen: screen -dm mything

The second one has the advantage of you being able to re-attach and see the output before it finishes, if you'd like.

share|improve this answer
add comment

Try using disown...

Try the following - which will not return text....

sleep 5 &
disown %1

This will never tell you the job has completed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.