Log errors from 'make' command, how do i?
Hi all,
Due to being on my summer holidays and being bored out of my brain i have decided to install gentoo due to the recommendations of its portage/packaging system ('emerge'), to find it is a splendid OS. Anyway, because it doesn't seem to work with the binaries that Alcatel provide i am trying to compile the mgmt.o module for the Alcatel SpeedTouch USB ADSL modem, however i am getting errors. But...i can't see the errors because they just whizz by me on the screen, i have installed all of the software it needed, like sarlib etc. What i would like tto do is find a way to be able to read all of the output including errors that is given when i call 'make'. Kind Regards Mark Rawson |
You can redirect the error messages to a text file with:
make 2> make.errors.txt |
im not sure if this will work with this but if you type | more it gives them screen by screen or something... i think
|
you could do either of the above suggestions [although I would suggest less rather than more - it enables you to scroll back]:
so make | less or make > dummy-file it depends whether you want to view the errors once or save them to refer to them. If you want to just see them once, then do the first, it just shows the output screen by screen. If, on the other hand, you want to refer to the errors later, redirect the ouput to a text file. |
ho_10 i hav a question... do you have to create the file first [the dummy file] or does it do that..?
|
You do not have to create the file prior to "command > file.log" although i believe that "command >> file.log" actually appends to an already created file or creats one itself.
Anyone that wants an easy way round that works brilliantly for installing the speedtouch USB modem on thier system download the speedbundle from: http://sourceforge.net/project/showf...?group_id=3581 . It includes all the config files and binaies etc that you need. P.S. i think when using commands like 'make' you need to include the 2 before > like so: "command 2> file.log" otherwise it just outputs the commands it used to the file. Kind Regards Mark Rawson |
Thanks mark rawson!! .... so for example when im installing i type ...
$make 2> makeErrors.log ??? and can i do that with any command or only certain types? and also in what runlevels? all.. thatd be cool , like.... $ init 6 2> reboot-MumboJumbo.log :) |
To my knowledge this can be done with all commands but some may give different unexpected outputs than other. Regarding which runlevels i assume that you will be able to log part of runlevel 6 but not all due to the fact that it terminates all processes.
Kind Regards Mark Rawson |
yeah goodpoint mark.. but umm... where does it save the log if you cd ../ up all the way to root directory :) ?? just wondering .. would it have.. no write permissions?..
|
try using the command nohup
nohup make & the output is logged to a file called nohup.out |
the "command 2> file.log" has the same permissions as the user that executed it. So if you had not access to anything except your home directory then you would not be able to log anywhere but your home directory. You can obviously change the path that the file goes e.g. "command 2>/root/randomdir/debug.log
|
i see.. thanks a lot guys!! i get it now... :)
|
Hmm.....wasn't i the one supposed to be doing the understanding as i asked the first question? lol.
Kind Regards Mark Rawson |
lol! ... who says we cant learn too? :) dont be a sponge and soak up the knowledge for yourself :-D
|
All times are GMT -5. The time now is 02:12 PM. |