Showing posts with label gt; /dev/null 2gt;amp;1. Show all posts
Showing posts with label gt; /dev/null 2gt;amp;1. Show all posts

Friday, 13 May 2011

> /dev/null 2>&1

What does "> /dev/null 2>&1" mean?

Ever wondered what the trailing garbage in some commands on a Unix system mean?  What's the funny looking  greater-than, ampersands and numbers after the commands mean? In this article we’ll explain those weird commands.
Here’s an example command:
mycommand > /dev/null 2>&1
Below is a graphical representation of whats going on.  This is explained later.