views:

156

answers:

2

I am compiling a kernel module and it has many compilation errors in it. After running "make", the errors thrown out are too many to fit in the screen. Scrolling up doesn't reach the first error. I tried capturing the errors by doing make &2 > log which didn't work (log file was empty and the error messages were still dumped on screen).

Can someone please tell me how to go about logging all the messages generated during compilation/make into a logfile?

+1  A: 

Try doing:

make >&log

the & after the > tells the shell to dump both stdout and stderr to the log. This can also be used with pipes.

Nathan Fellman
Thanks this helped me. :)
dexkid
+2  A: 

If you want to watch it scroll past, too:

 make 2>&1 | tee log

(/bin/sh, bash and related) This sends the standard error to the same place as the standard output, then pipes them through tee to capture the result and still get screen action.

dmckee