[PLUG] ls -d does not work as it should

John Meissen john at meissen.org
Mon Jun 25 23:34:35 UTC 2018


rshepard at appl-ecosys.com said:
>    What option would you use to list only subdirectories and not files in the
> cwd or the subdirectories? 

I generally take the easy way and just do
  ls -l | grep drw

You could do 
  find . -type d -maxdepth 1

Or if you want it sorted,
  find . -type d -maxdepth 1 | sort

Each has it's own quirks.






More information about the PLUG mailing list