Save a directory list to a file
Ivan | Sat, 2009-06-27 11:35
If for whatever reason you need a list of files within a certain directory in text format you can do so using the ls Terminal command.
Just open Terminal, navigate to the required directory and then enter one of these commands to save the information to the directory.txt file:
Only the files within the directory: ls > directory.txt
Lists all subdirectories recursively: ls -R > directory.txt
Sorts by time of last modification: ls -t > directory.txt
For more options check this page.
Commenting on this Blog entry is closed.

thank you
# man ls
pesonaly I like to use it as # ls -BgGh
but for list of files in text format I like # ls -m > textfilename.txt
and the # stat command is nice one because you can get more control of the output. like a format for example.
just an example:
# stat --format="--NAME: %n
> --ACCESS: %x
> --MODIFY: %y
> " * > textfilename.txt
There is a manual page for stat command as well: # man stat
KNOPPIX.net
FROM ZERO TO LINUX IN 5 MINUTES
Back to the terminal people!
LOL
You people crack me up!
http://stevefakeballmer.wordpress.com/
I am not Steve Ballmer pretending not to be me!
I use Print directory to print the directory listing to a file..
Find Here : http://www.print-directory.com
Is that working with Unix Operating Systems?
KNOPPIX.net
FROM ZERO TO LINUX IN 5 MINUTES