Thursday, August 27, 2009

List only directories in Linux

There are many ways to list only directories in a linux machine.

1) ls -ld /*

2) tree -di

3) ls -l | grep '^d' | awk '{print $8}' ### for Red Hat put $9 & for OpenSuse put $8

No comments: