[PLUG] Listing only directory names

Russell Senior seniorr at aracnet.com
Thu Mar 10 17:04:46 UTC 2005


>>>>> "Rich" == Rich Shepard <rshepard at appl-ecosys.com> writes:

Rich>    I have just re-read the 'ls' man page but do not see an
Rich> option that will let me view only the names of subdirectories
Rich> and not the individual files.  Tried piping the output of 'ls'
Rich> to 'file' and grep'ing that for the 'd' marker, but did not have
Rich> the proper options for file on the command line.

Rich>    What is the shell solution to listing only subdirectories
Rich> within a directory?

  $ find . -type d


-- 
Russell Senior         ``I have nine fingers; you have ten.''
seniorr at aracnet.com



More information about the PLUG mailing list