Printing Bootscript error messages to file

Gerard Beekmans gerard at linuxfromscratch.org
Tue Oct 9 12:52:29 PDT 2001


On Tue, Oct 09, 2001 at 01:45:21PM -0500, Debian User wrote:
> Thank you, it seems that standard output prints to dmesg but standard error
> redirects somewhere.  How does standard output have a place to write?

dmesg isn't a standard output receival location or anything of that sort.
It just prints out what's in the kernel message buffer, so it contains
messages from the kernel or modules inserted.

standard output and error are both sent to your screen by default unless
you redirect it elsewhere. To redirect standard output:
	command > stdout-file

to redirect error:
	command 2> stderr-file

to have both stdout and stderr redirected to the same file you can copy
stderr to stdout like this:
	command > stdout-file 2>&1

now stderr will be written to the stdout-file file

-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list