Thursday, December 10, 2009

Listing directories only in bash

Now this is embarrassing. All these years with an Unix operating system and I couldn't figure it out by myself. Anyways, here is how you do it:

Method 1:

ls -d */
Method 2:
echo */

0 comments:

Post a Comment