I'm attempting to redirect stderr from a mbuffer command to a file. It isn't working; the stderr output still appears on the screen and errors.txt is empty. My command is below:
$ raspivid -w 1280 -h 720 -o - | mbuffer -m 60M -f -o /tmp/temp_video.h264 2> errors.txt &
[2] 5278
in @ 1006 KiB/s, out @ 1006 KiB/s, 9292 KiB total, buffer 0% full^C
in @ 0.0 KiB/s, out @ 0.0 KiB/s, 9.9 MiB total, buffer 17% full^C
FYI, the stderr output I'm trying to redirect is "in @ 1006 KB/s...."
What did I do wrong? Thanks!
2>&1
instead of2>1
--
before2>
then. It's an options end delimiter that works with most of CLI tools. Let me know whether it helps.