開心生活站

位置:首頁 > IT科技 > 

linux,tee命令詳解

IT科技1.76W

tee命令可以從標準輸入設備讀取數據,將其內容輸出到標準輸出設備,同時還能保存成文件

參考範例:

如果使用指令”tee”將用戶輸入的數據同時保存到文件”file1″和”file2″中,具體命令爲:

[root@linuxcool ~]# tee file1 file2 

tee命令的具體語法格式爲tee [參數] [文件]。

參數:

-a 附加到既有文件的後面,而非覆蓋它 

-i 忽略中斷信號 

— help 查看幫助信息 

— version 顯示版本信息 

linux tee命令詳解

標籤:命令 linux tee