Using tee to create a log

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Kurt Granroth
日付:  
題目: Using tee to create a log
On Thu, 26 July 2001, Alan Dayley wrote:
> I have a command line utility that spits out data on the screen as it
> runs. I want to capture this data to a "log" file so I can read it later.
> I have been told the tee command will do this for me but I can't seem to
> get the command line correct as the log file is always empty.


This should do it:

% your_utility | tee output.log

Mind you, 'tee' only works on stdout so if your utilties output is really on 
stderr, it won't capture it by default.
-- 
Kurt Granroth            | http://www.granroth.org
KDE Developer/Evangelist | SuSE Labs Open Source Developer
         | 
            KDE -- Conquer Your Desktop