1. 程式人生 > >tee可以看見輸出並將其寫入到一個檔案中

tee可以看見輸出並將其寫入到一個檔案中

可以看見輸出並將其寫入到一個檔案中

如下使用tee命令在螢幕上看見輸出並同樣寫入到日誌檔案my.log

ls | tee my.log

tee可以保證你同時在螢幕上看到ls的輸出並寫入檔案  my.log

tee 的解釋為:read from standard input and write to standard output and files