Every program in Linux (or any Unix variant) has three standard files available to it:
- STDIN - the standard input stream
- STDOUT - the standard output stream (which can be redirected in the shell using ">")
- STDERR - the standard "error output" stream (which can be redirected using "2>")
Normally, the shell intermingles STDOUT and STDERR output, displaying both of the two streams inter-mingled. But, as I said, you can redirect either one or both.
So what if you want to just discard
something? Well, that's why you've got a nice "bit-bucket," called /dev/null
. Anything you write to it drops into the bucket. Anything you read from it is immediate end-of-file.
The bit-bucket must
be emptied on a regular basis. (The most common cause of an unexpected system crash is: "bit-bucket overflow.")
Bits are very smelly and sticky. (Especially
the bits from Windows machines!) Be careful not to spill the bucket's contents on the floor when you empty it: they'll leave an indelible stain on any carpet.