In bash, calling foo would display any output from that command on the stdout.
foo
Calling foo > output would redirect any output from that
foo > output
You can primarily use Zoredache solution, but If you don't want to overwrite the output file you should write tee with -a option as follow :
ls -lR / | tee -a output.file