Thanks for this. Useful! On Saturday 27 December 2003 16:15, Ken Schneider wrote:
-----Original Message----- From: Nick Selby
To: suse-linux-e@suse.com Date: Sat, 27 Dec 2003 09:04:23 +0100 Subject: [SLE] Showing Directory structure 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
-- ---------------------------- Nick Selby US Mobile: +1 347 804 4410 Germany: +49 89 2737 4527 Germany Fax: +49 89 2737 4529 *Currently in: MUNICH*