Redirecting bash STDOUT, STDERR

For some reason I can never remember this, so I have to store it for reference:

Bash Redirect STDOUT and STDERR to /dev/null

grep * &>/dev/null


Bash Redirect STDERR to STDOUT

This will cause the stderr output of a program to be written to the same file descriptor as stdout.

grep * 2>&1

 

Additional information