Skip to main content

With any Unix application or command, you can suppress all output with

cmd >/dev/null 2>&1

The first bit redirects the standard output (unit number 1) to /dev/null. But you need the second part to ALSO redirect the error output (unit number 2) to the same place as number 1.

In UNIX, STDIN=0, STDOUT=1 and STDERR=3STDERR=2

 

With any Unix application or command, you can suppress all output with

cmd >/dev/null 2>&1

The first bit redirects the standard output (unit number 1) to /dev/null. But you need the second part to ALSO redirect the error output (unit number 2) to the same place as number 1.

In UNIX, STDIN=0, STDOUT=1 and STDERR=3

With any Unix application or command, you can suppress all output with

cmd >/dev/null 2>&1

The first bit redirects the standard output (unit number 1) to /dev/null. But you need the second part to ALSO redirect the error output (unit number 2) to the same place as number 1.

In UNIX, STDIN=0, STDOUT=1 and STDERR=2

 
Source Link

With any Unix application or command, you can suppress all output with

cmd >/dev/null 2>&1

The first bit redirects the standard output (unit number 1) to /dev/null. But you need the second part to ALSO redirect the error output (unit number 2) to the same place as number 1.

In UNIX, STDIN=0, STDOUT=1 and STDERR=3