This is a quick code scrap – I needed a list of all the files within a directory path on a Linux server today. I need to do this infrequently and never remember the command, so here it is for my own future posterity:
~# find /path/to/scan/ -type f > /tmp/files.txt
The above code will work on any Linux machine supporting the find command, and will dump a list of all files in every sub-directory to /tmp/files.txt
Each line of the file will resemble:
I have just recently created a Windows version of this post, available here.