On the shell:
0 means standard input
1 means standard output
2 means standard error output
2>&1 means: redirect standard error output to standard output.
> means output redirection
|: is a pipe, example:
cmd1 | cmd2 means: The standard output of the command cmd1 is the standard input of cmd2.
Explain the third command line in detail, (ls you no;ls yes) 2>&1|egrep \* >file:
2>&1 means: redirect the standard error output to Standard output.
| means: pipe;
egrep \*: search all strings.
>file: import standard output into file file (if file exists, empty file, if not, create.);
linux simple operation
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=327029103&siteId=291194637
Ranking