Create file with full directly listing (Linux)
by Logan Rogers-Follis on Sep.06, 2020, under Linux, Techie
If you need a full listing of all the files in a folder saved to a file then use the following from a shell:
'ls' > file_list.txt
NOTE: In this case the file_list.txt file will be listed in the file_list.txt file, and to avoid this, just save the file_list.txt file to a different location than you are running the ‘ls’ command in.