I am sure there is a simple answer but I have been struggling to create a txt file of all the file names in a directory.
I am currently in the directory of where I need to collect all the file names of. This is what I have tried.
for i in ls; $i |../log.txt ; done
The log.txt
file exists in the directory above.