How to hide terminal command output messages under ubuntu / debian linux

There are times when we do not want our scripts or programs to outputy any kind of message to the standard output – like for instance if we have multiple scripts in our crontabs. If you didn’t have your crontab configured in such a way that it automatically shoots you an email if something is shown on one of its outputs, but you indeed have at least some kind of a function implemented within your script to alert you in one for of another, than silencing the output is somewhat sensible.

Either way, to employ a pseudo force silent mode run your scripts/programs like this:

/path/to/ 2&>1

Remember to only hide the output if you are definately sure thar you don’t need to see it!

About the author

Gábor Hargitai

View all posts