Can anyone tell me what is the difference betwwen &> and > in hive?
&>
>
When to use which one?
For my work, hive -f Script.hql > output.xls works and hive -f Script.hql &> output.xlsx works?
hive -f Script.hql > output.xls
hive -f Script.hql &> output.xlsx
This is not specific to hive but rather a feature in your shell. command > file redirects stdout to a file and command &> file redirects both stderr and stdout to the same file.
command > file
command &> file
See also Redirect stderr and stdout in a Bash script