Linux commands (ix) pipeline and I/O redirection >, >>, 2>, 2>>, &>, <, <<, tee

Source: Internet
Author: User

REDIRECT:> < >> <<

Arithmetic, controller: CPU
Memory: RAM
Input device/Output device

Programs: Directives and data

Controller: Instruction
The arithmetic device:
Memory:

Address bus: Memory addressing
Data bus: Transferring data
Control Summary: Control instructions

Register: CPU Ephemeral memory

I/O: Hard disk,

Program

Input device:

Output device


System settings
Default output device: Standard output, STDOUT, 1
Default input device: standard input, STDIN, 0
Standard error Output: STDERR, 2

Standard input: Keyboard
Standard output and Error output: Display

I/O redirection:

Linux:
: Overwrite output
>>: Append output

SET-C: Prohibit overwrite redirection for already existing files;
Force overwrite output, use >|
Set +c: Turn off the above features


2>: Redirect Error output
2>>: Append method


&>: Redirect standard output or error output to the same file


<: Input redirection
<<:here Document

Pipeline: The output of the previous command, as input to the latter command

Command 1 | Command 2 | Command 3 | ...

Tee: From the standard output to the screen, a copy saved to a file

Linux commands (ix) pipeline and I/O redirection >, >>, 2>, 2>>, &>, <, <<, tee

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.