LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
Thread Tools
Old 07-23-2004, 01:24 PM   #1
DDD25
LQ Newbie
 
Registered: Jul 2004
Posts: 7
Thanked: 0
How to direct output from make to a file?


[Log in to get rid of this advertisement]
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.
DDD25 is offline     Reply With Quote
Old 07-23-2004, 01:32 PM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282
Thanked: 1
try :
make 1> no-error.log 2> errors.log
keefaz is offline     Reply With Quote
Old 07-23-2004, 01:38 PM   #3
DDD25
LQ Newbie
 
Registered: Jul 2004
Posts: 7
Thanked: 0

Original Poster
Thanks I tried and it gives:

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

Am I doing something wrong?
DDD25 is offline     Reply With Quote
Old 07-23-2004, 01:58 PM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282
Thanked: 1
you use csh shell
make >&! make.log
keefaz is offline     Reply With Quote
Old 07-23-2004, 02:00 PM   #5
DDD25
LQ Newbie
 
Registered: Jul 2004
Posts: 7
Thanked: 0

Original Poster
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.
DDD25 is offline     Reply With Quote
Old 07-24-2004, 02: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
Thanked: 0
Code:
make >log-file 2>&1
or, to page it,
Code:
make 2>&1 | less
osvaldomarques is offline     Reply With Quote
Old 07-25-2004, 06:55 AM   #7
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217
Thanked: 0
I've always liked this:

Code:
make | tee make.log
fr0zen is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Capture 'make' Output to File Kenji Miyamoto Linux - Software 4 05-23-2005 06:56 PM
How to direct output both log file and to terminal... freebies Linux - General 1 02-25-2005 07: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 05:32 AM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 08:17 PM
Is it possible to make a "file" that can change its output when accessed? oot Linux - General 5 05-11-2003 09:30 PM


All times are GMT -5. The time now is 08:05 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration