Linux pipelines and redirection data streams classification command line shell data streams have the following definition name description number default STDIN standard input 0 keyboard STDOUT standard output 1 terminal STDERR standard error 2 terminal command through STDIN receive data, through... linux pipelines and redirection data streams classification command line shell data streams have the following definition name description number default STDIN standard input 0 keyboard STDOUT standard output 1 terminal STDERR standard error 2 terminal command through STDIN receive data, use STDOUT to output results or STDERR to output error pipelines and redirection we can control data stream classification keyword function example redirection> redirect STDOUT to file (overwrite) echo "test"> outfile> redirect STDOUT to a file (append) echo "test"> outfile2> redirect STDERR to a file (overwrite) ls okkkk 2> errfile2> & l redirect STDERR to the file where STDIN is located ls OK> file 2> & 1 pipeline | use the STDOUT of the first command as the STDIN ls-of the second command- l | grep "file_to_find" redirection to the device/dev/null will be discarded
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