Re: [問題] Gentoo網卡(RTL8111/8168) module

看板Linux作者 ( 殺手哥吉拉 13)時間15年前 (2008/12/21 15:38), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串6/8 (看更多)
※ 引述《frsnic (路人)》之銘言: : 感覺沒什麼問題說... : http://frsnic.miroko.tw/dmesg.txt : 沒看到 error 和 warning : 順便問一下 要怎麼把錯誤訊息弄到檔案裡 : 例如 /etc/init.d/net.eth0 restart > abc : 這樣只會有部分的訊息進去 : 有些錯誤訊息還是噴在螢幕上的 output 有兩種: stdout(1) 跟 stderr(2) 通常錯誤訊息是寫到 stderr,如果你直接 redirect 到檔案裡面 只會存入 stdout 解決方法是把 stderr 也導到 stdout /etc/init.d/net.eth0 restart > abc 2>&1 ps. 2>&1 要放在最後面,這是上次給小州大指正的 :) -- 我想你會衰成這樣都是我害的 ---- Tizzy Mac 緊張的麥金塔?這是誰(._.?) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.194.177.157

12/21 15:43, , 1F
可以解釋一下 2>&1 的意思嗎 新手 ><"
12/21 15:43, 1F

12/21 17:41, , 2F
把stdout(1)和stderr(2) merge起來
12/21 17:41, 2F
文章代碼(AID): #19JV9vI8 (Linux)
討論串 (同標題文章)
文章代碼(AID): #19JV9vI8 (Linux)