Answers for "linux 2>&1 /dev/null"

2

What does '>/dev/null 2>&1' mean

> is for redirect

/dev/null is a black hole where any data sent, will be discarded

2 is the file descriptor for Standard Error

> is for redirect

& is the symbol for file descriptor (without it, the following 1 would be considered a filename)

1 is the file descriptor for Standard Out

Therefore >/dev/null 2>&1 is redirect the output of your program to /dev/null. Include both the Standard Error and Standard Out.

Much more information is available at The Linux Documentation Project's I/O Redirection page.
Posted by: Guest on March-18-2020

Code answers related to "linux 2>&1 /dev/null"

Browse Popular Code Answers by Language