Print the files in a directory and sub-directories in UNIX

ls -a -R > files.txt
This command will print a list of the files into a new text file.