Articles: Listing Only Directories In Linux - more ways

Posted by: Anonymous on 07/17/2002 - 02:42 PM
Here are two more ways of getting only the directories in Linux

ls -al | grep '^d' | cut -d=":" -f2 | cut -d=" " -f2

ls -1ap | grep / | cut -d"/" -f1

-Vishwanath