Question: what does 1 &2 do?
Answer: In Unix /Linux system 1 is for stdout and 2 for stderr. ls -a 1> output. txt means you are sending Standard output (stdout) to output. ... both Standard output (stdout) and Standard Error (stderr) will redirected to output.