If you do a ls > file.txt, the output will contain a single column of text. If you want to use multiple columns, do a
ls -C > file.txt
If you do a ls > file.txt, the output will contain a single column of text. If you want to use multiple columns, do a
ls -C > file.txt