Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to list all files (order by name) in a Linux directory/subdir, and then export result to a text file?

share|improve this question

closed as not a real question by Mechanical snail, Kyle Jones, Dave, Sathya Jan 14 '13 at 9:41

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Assuming I wrote a program for you, to do the same, do you have Java installed? –  Hele Jan 14 '13 at 8:10
    
What have you tried? –  Dave Jan 14 '13 at 9:01

1 Answer 1

You can direct the output from a command into a file using the > symbol, so:

ls > myfile.txt

will dump the output of ls to myfile.txt

Can't remember the options for recursion or sorting, Google or the man pages are your friends here - think ls -lR might do the trick but the details are all online.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.