Get the App
SLTechnology News&Howtos  ›  Servers  › 

Standard Imuro and pipelines

Shulou Source: shulou.com Published: 2022-06-03 04:23:22 10月03日 Update

Standard Imuro and pipelines

>: redirect the standard output to the file, the file content will be overwritten > >: redirect the standard output to the file, based on the original content, add content 2 >: redirect the standard error to the file and overwrite it. 2 > >: redirect the standard error to the file and append it. & >: indicates merging standard output and error output override redirection & > >: redirects standard output and standard error 2 > & 1: indicates the same meaning & > that is, merging standard output and error output override redirection; & > or > & or 2 > & 1: redirects standard output and standard error to a file as the same data stream >

Example: append who to / data/test.log file

2 >

Example: put the right ones in the F1 file and the wrong ones in the f2 file

& >

Example: put all the right and wrong in the all.log file

Set-C/set + C

Example: prohibit overwriting the hostname to the all.log file / remove the prohibited overwrite

\ > |

Example: force all.log file to be overwritten

(.)

Example: redirect the execution results of both date and cal commands to the all.log file

<

Example: write the contents of the f1.log file to the f3.log file

Tags: File standard output content error command input letter pipe uppercase character lowercase screen result mandatory two host base uppercase letter typeface Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Technology Apple Huawei MySQL