LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-23-2004, 12:24 PM   #1
DDD25
LQ Newbie
 
Registered: Jul 2004
Posts: 7

Rep: Reputation: 0
How to direct output from make to a file?


I am compiling a C++ program and it has a lot of errors so that I cannot scroll to see the first one. Is it possible to direct the output from make to a file so that I can look at it? I tried make > logfile or make | more and these do not work.

Thanks.
 
Old 07-23-2004, 12:32 PM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282

Rep: Reputation: 66
try :
make 1> no-error.log 2> errors.log
 
Old 07-23-2004, 12:38 PM   #3
DDD25
LQ Newbie
 
Registered: Jul 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks I tried and it gives:

ni 8% make 1> no-error.log 2> errors.log
Ambiguous output redirect

Am I doing something wrong?
 
Old 07-23-2004, 12:58 PM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282

Rep: Reputation: 66
you use csh shell
make >&! make.log
 
1 members found this post helpful.
Old 07-23-2004, 01:00 PM   #5
DDD25
LQ Newbie
 
Registered: Jul 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by keefaz
you use csh shell
make >&! make.log
It works, it works, it works

Thanks a lot, I really appreciate the help.
 
Old 07-24-2004, 01:50 AM   #6
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Code:
make >log-file 2>&1
or, to page it,
Code:
make 2>&1 | less
 
Old 07-25-2004, 05:55 AM   #7
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Rep: Reputation: 30
I've always liked this:

Code:
make | tee make.log
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture 'make' Output to File Kenji Miyamoto Linux - Software 4 05-23-2005 05:56 PM
How to direct output both log file and to terminal... freebies Linux - General 1 02-25-2005 06:32 AM
How to make work a Direct Connect client and a DC Hub on the same box? 4mix Linux - Software 0 10-30-2004 04:32 AM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 07:17 PM
Is it possible to make a "file" that can change its output when accessed? oot Linux - General 5 05-11-2003 08:30 PM


All times are GMT -5. The time now is 11:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration