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 want a process to just NOT print its stdout or stderr output.
I know that I can do something like
program >output.txt 2>errors.txt and then rm output.txt errors.txt but its not elegant.
I want that they should not at all be stored anywhere in the first place.
Any idea how to do so?

share|improve this question

2 Answers 2

Just run it as program >/dev/null 2>&1

share|improve this answer

If you never want it to output stdout or stderr (much like how I have it set up for my Kate text editor) you can add the following line to your ~/.bashrc:

alias kate='kate 2>/dev/null 1>/dev/null'

Just replace kate with the needed program, and you should be good to go.

share|improve this answer

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.