Redirect stdout:
command > file
command 1> fileRedirect stderr:
command 2> fileRedirect stderr to stdout:
command 2>&1 fileRedirect stderr and stdout:
command > file 2>&1
command &> file # non-POSIX, i.e. less compatibleClear a file:
:> file
true > file # same as aboveMake file executable:
chmod +x <file>