stderr/stdout redirection

Redirecting the standard error (stderr) and stdout to file

$ command-name &>file
$ command > file-name 2>&1

To append to a file instead:

$ cmd >>outfile 2>&1
$ cmd &>>outfile

Source