Goal: Generate a simple text file with a list of files in it
find "/path/to/search" -type f | sort > list.txt
The -type f only returns files.
find /home/mruckman -maxdepth 1 -type d
The -type d only returns directories

Technical notes, and other ideas.
Goal: Generate a simple text file with a list of files in it
find "/path/to/search" -type f | sort > list.txt
The -type f only returns files.
find /home/mruckman -maxdepth 1 -type d
The -type d only returns directories