Redirecting Command-Line Output to Files

When using the command line, you can redirect standard output and standard error into separate files or into a single file. How you redirect command-line output depends on which operating system you are using: