View previous topic :: View next topic |
Author |
Message |
TheCoop Veteran
Joined: 15 Jun 2002 Posts: 1814 Location: Where you least expect it
|
Posted: Thu Oct 03, 2002 4:09 pm Post subject: redirecting output of a console program to a file |
|
|
i am having problems with quake3 atm, it freezes up X and doesnt start. therefore i have got to look at the console output from quake3 as it starts up, but i cant as i have to restart X when q3 freezes. how do i direct the output to a text file so i can have a look at it? _________________ 95% of all computer errors occur between chair and keyboard (TM)
"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler
Change the world - move a rock |
|
Back to top |
|
|
ShadyMilkman n00b
Joined: 20 Apr 2002 Posts: 57
|
Posted: Thu Oct 03, 2002 4:15 pm Post subject: |
|
|
There is a way to redirect output with the > operator, but that doesn't work if the program is outputting to stderr (standard error) instead of stdout (standard out). Anyway, try this:
[bum@hobomobile hobo$] quake3 > error.log
if that doesn't work it means that it's outputting the errors to stderr and afaik there's no way to capture that output. |
|
Back to top |
|
|
thegarbageman n00b
Joined: 28 Apr 2002 Posts: 74 Location: Overland Park, KS
|
Posted: Thu Oct 03, 2002 4:15 pm Post subject: |
|
|
You can try running quake in a terminal - then use the ">" character to redirect to a file.
Code: | quake3 > output.txt |
I am not sure of the executable file's name, as I don't play it, so just substitute "quake3" for the actual file's name
This may not work, however (depending on the exact method quake uses to output error messages.)
(edit) ha ha two simultaneous posts - at least if it outputs to stderr, you will be able to read it in the terminal window.
Last edited by thegarbageman on Thu Oct 03, 2002 4:17 pm; edited 1 time in total |
|
Back to top |
|
|
phong Bodhisattva
Joined: 16 Jul 2002 Posts: 778 Location: Michigan - 15 & Ryan
|
Posted: Thu Oct 03, 2002 4:43 pm Post subject: |
|
|
You can use &> to redirect standard error. I.e.
Code: | # command &> log.txt |
_________________ "An empty head is not really empty; it is stuffed with rubbish. Hence the difficulty of forcing anything into an empty head."
-- Eric Hoffer |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Thu Oct 03, 2002 5:53 pm Post subject: |
|
|
"2>&1" will additionally duplicate stderr onto stdout, so they will both go to the same place. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
|