Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-04-2007, 10:41 AM   #1
LQ Newbie
Registered: Sep 2007
Distribution: Debian Lenny
Posts: 26

Rep: Reputation: 15
How to print 'make' error message to a file

I tried to compile beaver-0.3.0 but got many error messages while using 'make' command. I tried to diagnose the problem but I cannot scroll up the screen further enougth (even using rxvt) to see the first error. I tried to use make >> filename, or make -d >> filename. The former one only printed a few make info, and the latter one printed debug info other than error info. Could someone give me an idea? Thank you!
Old 10-04-2007, 10:51 AM   #2
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Programs which run the terminal have two output file handles - standard output and standard error, which have identifier numbers 1 and 2 respectively. "Normal" output customarily goes to standard output, and error messages and warnings typically go to standard error.

When you re-direct output using > or >>, this re-directs only standard output (the former truncating the target file first, the latter appending to the file).

In Borne style shells (including bash, which is a very common interactive shell on Linux systems), you can re-direct standard error using 2> and 2>>. For your purposes, you probably want to re-direct them both to the same file. You can do this by saying "2>&1", which means "take output on standard error and send it wherever standard output goes". This is how:
make > make_output 2>&1
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make RSYNC skip a directory due to error message ArchW Linux - Networking 5 07-13-2006 10:26 AM
Epson Stylus C44+ doesn't print (no error message) addy86 Linux - Hardware 2 09-15-2005 11:51 AM
SuSE error message on 'make' jimbrook SUSE / openSUSE 2 05-08-2005 02:06 AM
Wine make help! error message included Jmcatch742 Linux - Software 0 11-17-2004 07:55 PM
Acrobat print error message rsamurti Slackware - Installation 0 01-24-2004 11:39 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:18 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration