I understand that computers work faster if they don't have to output data to the user, so I'm wondering if there is a way to hide the printed lines in the Terminal, and eventually just print any errors.

Is that possible and would that make the OS run faster in anyway?

1 Answer 1


you can redirect STDOUT to /dev/null this will prevent printing output and only prints STDERR to your terminal.

You can use it like

yourfavouriteprogram > /dev/null

And yes, it is faster:

time head -100000 large_file.txt
real    0m16.570s
user    0m0.009s
sys     0m0.189s

time head -100000 large_file.txt > /dev/null
real    0m0.018s
user    0m0.014s
sys     0m0.004s
  • And how exactly should I put it in the command line? (Not a very experienced user)
    – Tr4kTr
    Commented Aug 27, 2015 at 11:44
  • 1
    @Tr4kTr I edited my post. You just have to add > /dev/null at the end of your command
    – Wayne_Yux
    Commented Aug 27, 2015 at 11:47
  • Way faster judging from the example
    – kos
    Commented Aug 27, 2015 at 11:50
  • I am definitely going to use it in scripts. Never knew the difference was this big! Commented Aug 27, 2015 at 11:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .