English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Linux tee command is used to read data from the standard input and output its content as a file.
The tee command reads data from the standard input device, outputs its content to the standard output device, and saves it as a file.
tee [-ai][--help][--version][file...]
Parameters:
Use the command "tee" to save the user's input data simultaneously to the file "file1" and "file2Enter the following command in "
$ tee file1 file2 #Copy content in two files
After executing the above commands, you will be prompted to enter the data to be saved to the file, as shown below:
My Linux #Prompt the user to enter data My Linux #Output data, for output feedback
At this time, you can open the file "file" separately1" and "file2Check if the content is all "My Linux" to determine if the command "tee" has executed successfully.