Linux tee command
Linux tee command reads standard input data, and outputs its contents to a file.
tee command will read data from standard input, which is output to the standard output device, and saved as a file.
grammar
tee [-ai][--help][--version][文件...]
Parameters:
- -a or --append appended to the existing file, rather than covering it.
- -i or --ignore-interrupts ignore interrupt signal.
- --help online help.
- --version display version information.
Examples
Using the command "tee" while the data input by the user to save the file "file1" and "file2", enter the following command:
$ tee file1 file2 #在两个文件中复制内容
After the above command is executed, the user is prompted to the need to save the data file, as follows:
My Linux #提示用户输入数据 My Linux #输出数据,进行输出反馈
In this case, each open file "file1" and "file2", if the contents are viewing "My Linux" was judged to be directives "tee" if executed successfully.