PDA

View Full Version : [ubuntu] Output the verbose information into a file (2>1&)?



honeybear
December 1st, 2010, 04:37 AM
Hello,

I have read that 2>1& can help to put whatever arrives from info into the bash commaand line to is sort of not considered;

is it possible to output whatever comes out of the command line?

Example:


mplayer video.mpg 2>1& >> outputtomyfile.log
# or
cp -r -v source1 target1 2>1& >> outputtomyfile.log
# ... and so on ... to ouptut log into a file
# with zenity too ...

tgalati4
December 1st, 2010, 06:35 AM
I'm not familiar with that syntax, but the following should work:

mplayer video.mpg > outputtomyfile.log &

> is an output redirection pipe and the & puts it into the background until the thread is finished.

>> is the append redirection pipe and it appends to the existing file

< is an input redirection pipe and it can be used to feed information from the standard input to a command.

honeybear
December 1st, 2010, 08:33 AM
I'm not familiar with that syntax, but the following should work:

mplayer video.mpg > outputtomyfile.log &

> is an output redirection pipe and the & puts it into the background until the thread is finished.

>> is the append redirection pipe and it appends to the existing file

< is an input redirection pipe and it can be used to feed information from the standard input to a command.

well this is too simple for overriding several programs, surely. In order words your reply is not answering. Thank you anyhow for trying