1、命令帮助信息
linrm@linrm-VirtualBox:~$ tee --help
用法:tee [选项]... [文件]...
将标准输入复制到每个指定文件,并显示到标准输出。
-a, --append 内容追加到给定的文件而非覆盖
-i, --ignore-interrupts 忽略中断信号
--help 显示此帮助信息并退出
--version 显示版本信息并退出
如果文件指定为"-",则将输入内容复制到标准输出。
2、使用示例
linrm@linrm-VirtualBox:~$ free -h | tee -a free.txt
total used free shared buff/cache available
Mem: 7.8G 1.6G 5.1G 45M 1.1G 5.9G
Swap: 1.9G 0B 1.9G
linrm@linrm-VirtualBox:~$ cat free.txt
total used free shared buff/cache available
Mem: 7.8G 1.6G 5.1G 45M 1.1G 5.9G
Swap: 1.9G 0B 1.9G
linrm@linrm-VirtualBox:~$ make 2>&1 | tee make_build.log