Apparently I don't know all the output destinations that are available for use. I know about stdout
(&1
) and stderr
(&2
). However, after redirecting both descriptors, I sometimes still get some output in my console!
The easiest example I can think of is GNU Parallel; Each time I use it, I see a citation notice. Even when I do &2>1 > file
, I still see the notice.
And the same applies to emerge
: When I run emerge and there are some problems, some informations aren't printed to stdout
nor stdin
, since I redirect them and they still get through.
I mostly solve these problems by using script
, but I am still wondering what's causing this issue.
&2>1 > file
exactly what you typed? It should be>file 2>&1
to do what you want. What you typed will do something completely different (background the main command, to start with!). Order of operation is also important; redirectstdout
beforestderr
. – Stephen Harris Jul 15 '16 at 11:25/dev/tty
. – Satō Katsura Jul 15 '16 at 11:26parallel
:mkdir ~/.parallel; touch ~/.parallel/will-cite
will disable the annoying message. Alternatively, look around for other implementations ofparallel
. – Satō Katsura Jul 15 '16 at 11:30parallel
as an example. – MatthewRock Jul 15 '16 at 13:55