command > some_file.txt 2>&1

0

What does 2>&1 do in a linux console?

  • redirects stderr (2) to stdout (1)
  • When you need to capture command outputs as well as errors/info which are usually displayed on the screen the above comes handy.

Leave a Reply

    No Twitter Messages.