Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I know that to launch an application and still keep working on the terminal, & is put in the end of command (like emacs&)
But some commands still keep printing on the terminal, like this

So how to really keep the command quiet on the terminal?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

What you are seeing are the errors, being printed to stderr (standard error). By default stderr is printed to the terminal used to start the program. We can change this easily though, to point to /dev/null, which is basically a black hole. It's a device that doesn't do anything, so when you write to it, nothing actually happens. The following command will redirect ALL output (stderr and stdout) to /dev/null and then give you back your terminal.

firefox &> /dev/null &

The &> is the redirector, /dev/null is where we are redirecting to, and the last & means to "background" the process, so we can have our terminal back. On a side note, if you ever want to bring a backgrounded program back to the terminal, you can use the fg (short for foreground) command to bring it back.

share|improve this answer
    
Did work.. Thanks :) –  piyush Jun 14 '12 at 15:13
    
Good Explanation .......... –  One Zero Jun 14 '12 at 16:19
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.