Unix questions - how to list only dirs under a folder in linux?

This is Interesting: Free IT Magazines  
Home > Archive > Unix questions > September 2006 > how to list only dirs under a folder in linux?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author how to list only dirs under a folder in linux?
yihucd@gmail.com

2006-09-01, 7:52 pm

how to list only dirs under a folder in linux?

Chris F.A. Johnson

2006-09-01, 7:52 pm

On 2006-09-01, yihucd@gmail.com wrote:
> how to list only dirs under a folder in linux?


What's a folder?

To list directories:

ls -d */



--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Pascal Bourguignon

2006-09-01, 7:52 pm

yihucd@gmail.com writes:

> how to list only dirs under a folder in linux?


find $folder -type d -print

--
__Pascal Bourguignon__ http://www.informatimago.com/

Pour moi, la grande question n'a jamais été: «Qui suis-je? Où vais-je?»
comme l'a formulé si adroitement notre ami Pascal, mais plutôt:
«Comment vais-je m'en tirer?» -- Jean Yanne
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com