Redirect stderr to stdout or a file

0: stdin
1: stdout
2: stderr

# redirect stdout to a file
$ strace uptime > test.log
# equals to
$ strace uptime 1> test.log

# redirect stderr to a file
$ strace uptime 2> test.log

# redirect stderr to stdout
# if you write `strace uptime 2> 1`, it means that you redirect stderr to a file with the name 1
$ strace uptime 2>&1

# redirect stderr and stdout to a file
$ strace uptime &> test.log

# run a command in backgroud
$ long-running-command &

ref:
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html
https://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/