tee

linux tee 命令詳解


功能說明:讀取標準輸入的數據,並將其內容輸出成文件。

語  法:tee [-ai][--help][--version][文件...]

補充說明:tee指令會從標準輸入設備讀取數據,將其內容輸出到標準輸出設備,同時保存成文件。

參  數:
 -a或--append  附加到既有文件的後面,而非覆蓋它.
 -i-i或--ignore-interrupts  忽略中斷信號。
 --help  在線幫助。
 --version  顯示版本信息。
[root@localhost ~]# who | tee who.out
root     pts/0        2009-02-17 07:47 (123.123.123.123)
[root@localhost ~]# cat who.out
root     pts/0        2009-02-17 07:47 (123.123.123.123)
[root@localhost ~]# pwd | tee -a who.out
/root
[root@localhost ~]# cat who.out
root     pts/0        2009-02-17 07:47 (123.123.123.123)
/root
[root@localhost ~]#

本文出自 “起航工作室” 博客,請務必保留此出處http://liubin.blog.51cto.com/282313/131298


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章