[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.

Hrm...

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/\/$//'


a


More information about the linux mailing list