Linux基礎命令 tee

2021-09-05 10:25:09 字數 1178 閱讀 7807

tee

將標準輸入的內容複製到指定的檔案中,同時在標準輸出中顯示。

此命令的適用範圍:redhat、rhel、ubuntu、centos、suse、opensuse、fedora。

1、語法

tee [選項]  [files]

2、選項列表

選項說明

--version

顯示命令版本資訊

--help

顯示幫助文件

追加模式,並不覆蓋

-i | --ignore-interrupts

忽略終端訊號

3、例項

將檔案內容排序之後儲存到另外的地方 

[root@192 weijie]#cat 2.c                        //檢視內容

hello  linux

i   am weijie

love   world

hehe

im join

[root@192 weijie]#sort 2.c | tee 4.c         //排序之後儲存到4.c,並且送到biaozhun輸出

hehe

hello  linux

i   am weijie

im join

love   world

Linux基礎命令 文字編輯tee

tee 將標準輸入的內容複製到指定的檔案中,同時在標準輸出中顯示。此命令的適用範圍 redhat rhel ubuntu centos suse opensuse fedora。1 語法 tee 選項 files 2 選項列表 選項說明 version 顯示命令版本資訊 help 顯示幫助文件 追加...

Linux命令學習手冊 tee命令

tee ai help version 檔案.功能 tee以標準輸入作為輸入,標準輸出和檔案作為輸出。舉例 用tee生成乙個檔案,包含你敲入的內容 tee testfile 這樣,會提示要你用標準輸入輸入內容,然後敲回車會將你輸入的內容寫入testfile和輸出到標準輸出,如果用 ctrl d結束輸...

Linux命令(5) tee命令

tee命令作用可以用字母t來形象地表示。它把輸出的乙個副本輸送到標準輸出,另乙個 副本拷貝到相應的檔案中。如果希望在看到輸出的同時,也將其存入乙個檔案,那麼這個命 令再合適不過了。功能說明 讀取標準輸入的資料,並將其內容輸出成檔案。語 法 tee ai help version 檔案.其中,a表示追...