Redirect ALL Output to a File

Every good little hacker knows you can redirect STDOUT to a file like so:

blah > out.log

And you can redirect STDERR to STDOUT to a file like so:

blah 2>&1 > out.log

But what I didn’t know and just learned, is that you can redirect EVERY output stream to a file at the same time like so:

blah &> out.log

Useful.

Wednesday, November 10, 2010 — 3 notes
  1. benjaminsteinpro posted this