Reputation: 1401
I know how to do this on windows, but I want to create a list of files that are in a directory on a linux machine, either as a txt or csv file. Or is there a way to save the output of a command rather than showing it on screen? Any help is appreciated.
Upvotes: 0
Views: 11089
Reputation: 65811
ls
lists the files in a folder, check man ls
for options. To save the output of a shell command use redirection, e.g.:
ls > list.txt
or
ls -l > list.txt
etc.
Upvotes: 7