Tee command usage, tee command
Purpose Description: When executing a Linux Command, we can redirect the output to a file, for example, ls> a.txt. Then we cannot see the output, if we want to save the output to a file and view the output on the screen, we can use the tee command. The tee command reads the standard input and outputs the content to both the standard output and (multiple) files. Note: When Using MPs queue, the standard error output of the previous command is not read by tee. Common parameter format: tee only outputs to standard output, because no file is specified. Format: When tee file is output to standard output, it is saved to file. If the file does not exist, it is created. If the file already exists, the overwrite format is: tee-a file, which is output to the standard output and appended to the file. If the file does not exist, the file is created. If the file already exists, the content is appended to the end, instead of overwriting the format: tee-output to the standard output two times: tee file1 file2-output to standard output twice and save to both file1 and file2