tee 可以看见输出并将其写入到一个文件中

如下使用tee命令在屏幕上看见输出并同样写入到日志文件my.log中:

 
[root@localhost home]# top  |tee my.log
 
tee可以保证你同时在屏幕上看到top的输出并写入文件  my.log。
原文地址:https://www.cnblogs.com/maxomnis/p/5392844.html