Monday, August 25, 2008
Redirect both stderr and stdout to single file - linux
If you want two files, one for the output(mylog) and one for the errors(mylog.err)
$ ./command 2>mylog.err 1>mylog
And if you want to redirect both stderr and stdout to a single logfile
$ ./command >mylog 2>&1
so "mylog" will contain both stderr and stdout.
Subscribe to:
Post Comments (Atom)
© Jadu Saikia www.UNIXCL.com
1 comment:
I always do this using:
$ ./command &> mylog
Post a Comment