Gentoo網卡(RTL8111/8168) module - Linux

Table of Contents

※ 引述《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

緊張的麥金塔?這是誰(._.?)

--

All Comments

Sandy avatarSandy2008-12-24
可以解釋一下 2>&1 的意思嗎 新手 ><"
Barb Cronin avatarBarb Cronin2008-12-29
把stdout(1)和stderr(2) merge起來