[PLUG] listing directories only with ls- solved

Piet van Weel pmvw at outwardfocus.net
Thu Dec 7 01:56:23 UTC 2006


So except for the prettiness what is the difference of doing:

ls -d */

And 

ls * | grep /

Besides one does some prettying up of the output, not much; however, it is
important to note that 

ls --indicator-style=none -d */

Causes ls to append a / to the end of each directory in order to get the
correct output. Despite the not wanting of an indicator style.

Piet

-----Original Message-----
From: plug-bounces at lists.pdxlinux.org
[mailto:plug-bounces at lists.pdxlinux.org] On Behalf Of Carla Schroder
Sent: Wednesday, December 06, 2006 4:31 PM
To: plug at lists.pdxlinux.org
Subject: [PLUG] listing directories only with ls- solved

Goodness, all it takes to do this with ls is the sekeeritt incancation:

[root at asterisk1 sounds]# ls -d */
dictate/  digits/  es/  followme/  fr/  ha/  letters/  local/  phonetic/  
silence/  wx/

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Carla Schroder
Linux geek and random computer tamer
check out my Linux Cookbook! 
http://www.oreilly.com/catalog/linuxckbk/
best book for sysadmins and power users
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
PLUG mailing list
PLUG at lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug




More information about the PLUG mailing list