In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the use of the Linux tee command, the article is very detailed, has a certain reference value, interested friends must read it!
The tee command is used to redirect data to a file and, on the other hand, to provide a copy of the redirected data as a stdin for subsequent commands. To put it simply, redirect the data to a given file and screen.
1. Brief introduction to Command
After reading data from standard input, the tee command redirects the data to a given file and standard output. There can be multiple files for a given file.
Because tee means the letter T, data flows in from the left (standard input), shunts output from the right (standard output) and below (file), and the shape of the letter T vividly illustrates the flow direction of the data, so the command is named tee. The process of data flow is shown in the following figure.
Introduce the linux system tee command introduce the linux system tee command 2. Command format tee [OPTION]... [FILE]... 3. Option description-a,-- append
Use append mode when redirecting to a file
-I-- ignore-interrupts
Ignore interrupt (interrupt) signal
-- help
Display help information and exit
-- version
Display version information and exit
4. Common examples
(1) Standard error output and standard output are output to the screen and specified files file1 and file2 at the same time.
Make 2 > & 1 | tee file1 file2
2 > & 1 means to redirect the standard error output to standard output; tee means to output the command results to both the screen and the file.
The above is all the contents of the article "what is the use of Linux tee commands?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.