I need to log stdout and stderr to logfiles, but only show the error messages on screen. I can do this with:
cp -rpv a/* b 1> copyLog.txt 2> >(tee copyError.txt >&2)
Which I found somewhere in the web.
I just want to know how this >(tee copyError.txt >&2)
thing is called? I can't google for it, since Google ignores characters like angle brackets and the parentheses..
Best Answer
From
man bash
:You can search manpages by pressing
/
and then typing your search string, which is a good way of finding information like this. It does of course require that you know in which manpage to search :)You have to quote the
(
though, because it has a special meaning when searching. To find the relevant section in the bash manpage, type/>\(
.