Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Piping modprobe output to a text file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dechah
n00b
n00b


Joined: 18 Jun 2002
Posts: 37
Location: Melbourne

PostPosted: Fri Jun 21, 2002 12:39 am    Post subject: Piping modprobe output to a text file Reply with quote

I am trying to pipe the modprobe output to a text file so that I can post the results these forums for further analysis.

I have tried "modprobe uhci > textfile" however when I look at the textfile, I don't see all the output that appears on the screen during a normal modprobe of uhci. Is there a flag I am missing?
_________________
Cheers

Dechah
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Fri Jun 21, 2002 12:54 am    Post subject: Reply with quote

command > file tells the shell to take the "standard output" stream and pipe it to a file. However, there is another stream -- stderr -- that programs often write errors to. Both appear on the screen, but > file only takes stdout. So, to pipe both of them to the same place, write:

Code:
command > file 2>&1


You could even redirect them to separate locations:

Code:
command >stdout 2>stderr


(If no number is left of >, a 1 is implied, meaning stdout. So, if you ever see that, that's what's up.)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum