4/21/2010

一邊在螢幕輸出,一邊同時記log的方法

終於問到了

1. stdout + file
COMMAND | tee LOG_FILE_NAME

2. stderr + file
COMMAND 2>&1 | tee LOG_FILE_NAME

2>&1 是 stderr -> stdout,然後再用 tee 同時存到檔案中

COMMAND是指令,
LOG_FILE_NAME是要記的log檔名

1 comments:

Anonymous said...

Fun88 Slots | Play for Free - VieCasino.com
Fun88 is one fun88 soikeotot of the most innovative online slot games in the market and has a 12bet wide range 11bet of entertaining games to play. Try Fun88 slot for free now!