Welcome to MSDN Blogs Sign in | Join | Help

Eric Jarvi

the bug stops here

redirecting stderr to stdout on the command line

2>&1 is how you redirect stderr to stdout on the command line in windows, when I inevitably have to do this again sometime, maybe this will help me remember.  :)  [ XP redirection docs , technet docs ]

Published Friday, January 28, 2005 7:32 PM by ejarvi

Filed under: ,

Comments

# re: redirecting stderr to stdout on the command line @ Sunday, February 27, 2005 4:37 PM

Note that order of redirects is important:
2>&1 1>filename
not equals
cacls qqq 2>&1 1>filename

Example:
cacls qqq 2>&1 1>filename
cacls qqq 1>filename 2>&1

Vitaly Harisov

Anonymous comments are disabled
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker