-----Original Message-----
From: Nick Selby
Hi, I'm trying to get a list of the directory structure of something and could use some help. I went to man ls and saw that -R gives me Recursive, but that gives me every file within every directory on the tree. Doing ls -lhR Directory/ > file.txt gave me a text file with all the top level directory names in alphabetical order, then all the files within each directory, then all sub-level directory names in alphabetical order, then all their files ...
I want to generate a list of the directory tree without listing the files within the folders. I also would like the listing to show a directory immediately followed by its subdirectories, NOT a list of all top level directory names alphabetically, followed by the first level sub directories alphabetically, etc.
find . -type d -print will do what you are looking for Ken