Tee command usage, tee command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.