To redirect stdout to a truncated file in Bash, I know to use:
cmd > file.txt
To redirect stdout in Bash, appending to
Try this
You_command 1>output.log 2>&1
Your usage of &>x.file does work in bash4. sorry for that : (
0, 1, 2...9 are file descriptors in bash.
0 stands for stdin
, 1 stands for stdout
, 2 stands for stderror
. 3~9 is spare for any other temporary usage.
Any file descriptor can be redirected to other file descriptor or file by using operator >
or >>
(append).
Usage: <file_descriptor> > <filename | &file_descriptor>
Please reference to http://www.tldp.org/LDP/abs/html/io-redirection.html