[Gllug] Locating Subdirectories

Matthew King matthew.king at monnsta.net
Tue Jul 27 12:00:49 UTC 2004


Mick Farmer wrote:
> Dear GLLUGers,
> 
> I need to obtain the names of all the subdirectories in the
> current directory.  I'm currently using the following.
> 
> 	find * -type d -maxdepth 0
> 
> Does anyone have anything simpler?

ls -d1 */|sed 's/\///g'

or

echo */|sed 's/\///g'

Matthew

-- 
GIT/CM d+(-) s++:- a-->? C++++ UL++++$ P+++>++++ L++>++++ E>++ W--$ N
o? K++ w--- O-- M V? PS+>+++ PE-- Y+>++ PGP++@ t+ 5- X- R tv b+++>++++
DI++ D++ G e(*) h!>- r--- y->+++
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list