shell - Generate file that contains a list of all files in a directory on linux -


i know how on windows, want create list of files in directory on linux machine, either txt or csv file. or there way save output of command rather showing on screen? appreciated.

ls lists files in folder, check man ls options. save output of shell command use redirection, e.g.:

ls > list.txt 

or

ls -l > list.txt 

etc.


Comments