On [this SO thread][1] and a few other threads I have seen the following commands for redirecting `stdout` and `stderr` to a file.

Are they all equivalent? Is there any difference between them?


    command1 >> logfile 2>&1
    command &> logfile
    command >& logfile


  [1]: https://stackoverflow.com/questions/7526971/how-to-redirect-both-stdout-and-stderr-to-a-file