[clug] list only directories

Andrew Janke a.janke at gmail.com
Tue Nov 19 23:41:37 MST 2013

On 20 November 2013 16:38, Hal Ashburner <hal at ashburner.info> wrote:
> cool, but won't show hidden dirs (neither does my script), the trailing
> slashes, meh, mostly they won't matter.


ls -d {.,}*/

should do the trick.

> Mr Anonymous suggests something similar to Andrew
> find . -maxdepth 1 -type d -ls

Probably a better option, I'm just abusing bash expansion as opposed
to doing it with ls.

For even more line noise:

   ls -d1 {.,}*/ | sed -e 's/\/$//'


More information about the linux mailing list