In order to redirect stdout to a file in bash I use:
cmd > file.txt
To redirect stdout using Bash while appending I use:
cmd >> file.txt
and for both stdout and stderr to a truncated file I use:
cmd &> file.txt
How do I redirect both stdout and stderr appending to a file? cmd &>> file.txt did not work for me
But I want to redirect both stdout and stderr appending to a file. How do I do that?