command &> file.txt

Category: I/O Redirection & Pipes

command &> file.txt

Redirect both stdout and stderr to a file (bash shorthand)

Bash shorthand for redirecting both stdout and stderr to a file at once.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.