Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use of output, error, output append, error pursuit and emphasis orientation

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

The use of output, error, output append, error pursuit and emphasis orientation not only makes it easy for us to implement the contents of multiple commands in a single file, but also gives us a deeper understanding of Linux.

Program: instruction + data

Read in data: Input

Output data: Output

All open files have a fd: file descriptor (file descriptor)

Linux provides the program with three iBand O devices.

Standard input (STDIN)-0 accepts input from the keyboard by default

Standard output (STDOUT)-1 default output to terminal window

Standard error (STDERR)-2 default output to terminal window

1. Create a file using output redirection

two。 Use of output redirection

3. Output append redirection

4. Output redirection of error command

5. You can use 2 > to redirect the output of the error command.

6. Error command output append redirection

7. Show incorrect and correct output redirection with the same file

8. You can also use 2 > & 1 to output both incorrect and correct output redirections

9. Use different files to show the wrong and the right

10. You can use set-C to redirect output without overwriting the contents of the original file.

11. Use > | Force overwrite

twelve。 Unlock set + C

More than 13 commands output redirection simultaneously

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report