→ bibo9901:tee 03/10 14:11
→ noonee:感謝! 03/10 14:22
→ noonee:奇怪 如果是一般shell裡的指令 例如 ls | tee record |more 03/10 14:37
→ noonee:都有用 我那個程式是會跑很多天的 結果 03/10 14:37
→ noonee:./command | tee record | more 03/10 14:37
→ noonee:螢幕上還是沒東西 03/10 14:37
→ noonee:BTW 如果只用 ./command > record 的時候 03/10 14:40
→ noonee:系統似乎也是會累積一定的資料量才會一次存進 record裡 03/10 14:40
→ noonee:有辦法修改那個累積量的大小嗎? 03/10 14:40
推 dirkc:script -c ./command -f record; more record 03/10 16:02
→ dirkc:stdio到檔案預設是full-buf,到terminal是line-buf 03/10 16:03
→ dirkc:如果可以改程式,你可以setvbuf(3)停掉buf,輸出會快一點 03/10 16:06
→ dirkc:當然會影響效能,如果需要考慮的話 03/10 16:08