Linux basic configuration and management 2 ---- Linux multi-command collaboration ---- pipelines and redirection Linux basic configuration and management 1 ---- Linux Network basic configuration http://www.bkjia.com/ OS /201309/240457.html 1 pipelines and redirection 1 in Linux most commands are very simple, there are few complex commands. Each command only implements a simple function, we can combine different commands to implement complex functions. 2. in Linux, almost all commands return plain text data, the vast majority of data in plain text format is input in command Form 3 multi-command collaboration is the flow of shell data in 4 command lines completed through pipelines and redirection. The following name is defined to describe the default stdin standard input 0 keyboard stdout standard output 1 terminal stderr standard error 2 Terminal 5 Command received parameters or data through stdin, stdout and stderr are used to output the result or error 2 redirection 1> and redirect the standard output to the file, if this file already exists, it will overwrite it. For example, we use echo "haha"> output to output the output, then echo "Linuxcast"> output overwrites 2> and redirects the standard output to the file, if this file exists, it will be appended to the back end. For example, echo "tmpLinuxcast"> output will be used to append the output to output 3 2>, redirects a standard error to a file. If there is already a standard error, it will overwrite it. For example, we use ls-ld www.google.com 2> output, then we will output the error to output 4. We can use 2> & 1 to redirect the standard output and standard error to a file 5. We can use <to redirect the standard input., however, a few 3 pipelines are used. | 1 grep command: grep keyword file 2 uses the standard output stdout as the standard input stdin of another command. For example, I output the details of all files in the home directory, then, we use the pipeline to extract the output information from the grep file containing the keyword.