Sunday, July 08, 2007

List directories only in Linux

the command

ls -d */

will output only the directories below your current position in the filesystem.

So, if you are currently in /home/linus , and below that are three directories called images, docs, and code , the output will look like this

images/ docs/ code/