LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 10-04-2007, 10:41 AM   #1
olin
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
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
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:
Code:
make > make_output 2>&1
 
1 members found this post helpful.
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:29 PM.

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