Inputs from Linux are redirected from orientation and output

Source: Internet
Author: User

The standard inputs and outputs of Linux are as follows

When we execute commands in Linux, the commands are output to the console by default, and many times we need to output the commands to other devices, such as the most common in the file, or in the file. That's when you need to redirect the input and output of Linux.

Frequently used file redirection commands:
Command >file: Standard output redirected to a file, error still output screen
Command >>file: Standard output redirected to a file (append)
Command 1>file1: Standard output redirected to a file
Command 2>>file2: Standard error redirected to a file (append)
Command 1>file 2>&1: standard output and standard error Redirect to a file together
Command>>file 2>&1: Standard output and standard error redirected to a file (append)
Command < File1 >file2: File1 as standard input, file2 as standard output
Command <file: File as standard input
Note: The above command>file 2>&1 can be modified to Command>file 2>>file

Reference

Http://www.cnblogs.com/chengmo/archive/2010/10/20/1855805.html

Inputs from Linux are redirected from orientation and output

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.