Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-25-2005, 06:16 PM   #1
Registered: Dec 2002
Location: San Luis Obispo, CA
Distribution: Fedora Core 3
Posts: 618

Rep: Reputation: 30
Output redirection

I'm trying to get my make output goto and error_log. I've tried the following commands and it's not cooperating:

make -k all > error_log

make -k all 2>error_log

make -k all 1>error_log

What is going to the error_log are the the make commands. Ex. g++ -o -c "my_stupid_program"

Any help would be appreciated
Old 01-25-2005, 06:25 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
You could try
make -k all > error_log 2>&1
make -k all | tee error_log

Old 01-25-2005, 06:31 PM   #3
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
(make -k all 2>&1) | tee error_log
Will push everthing to the error_log as well as scrolling it up the screen ( so you know whats going on. )

If you simply want to record the errors, and you don't want them echoed to the screen then.
make -k all 2> error_log
The only thing you seemed to be missing above was the space after >

If you want to still echo the errors, and record them to file do:
(make -k all 3>&1 1>&2 2>&3 ) | tee error_log


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
what is output redirection? LinuxPadawan General 5 05-18-2005 12:53 PM
Output & input redirection serotonincy Programming 3 04-12-2004 08:28 AM
Minor output redirection problem.. Tyir Linux - General 0 01-27-2004 09:13 PM
output redirection to another directory spyghost Linux - Software 3 09-21-2003 09:28 AM
Output redirection legtester Linux - General 4 07-07-2003 02:36 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:53 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