On 6/25/2018 4:38 PM, Brian Stanaland wrote:

I don't understand why this works but...

ls -d */

[root@li1233-197 log]# ls -d */
anaconda/  audit/  chrony/  httpd/  rhsm/  sa/  tuned/

Brian

Brilliant! It works because of shell globbing. Compare to
echo */

Steve



On Mon, Jun 25, 2018 at 7:34 PM, John Meissen <[email protected]> wrote:

[email protected] 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.



_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug




_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to