一、作用

用于读取标准输入的数据,将其内容转交到标准输出设备中,同时保存成文件

二、选项

  • -a 追加写入操作

    三、实例

    1. [root@localhost ~]# tee 1.txt a.txt
    2. 12312
    3. 12312
    4. 123123
    5. 123123
    6. 42
    7. 42
    8. ^C
    9. [root@localhost ~]# cat 1.txt
    10. 12312
    11. 123123
    12. 42
    13. [root@localhost ~]# cat a.txt
    14. 12312
    15. 123123
    16. 42
    ```shell [root@localhost ~]# tee -a 1.txt a.txt 12 12 21312 21312 ewq ewq ^C [root@localhost ~]# cat a.txt 12312 123123 42 12 21312 ewq [root@localhost ~]# cat 1.txt 12312 123123 42 12 21312 ewq

```