Friday, January 30, 2015

List directories in Bash


Here we present tree methods to list directories in Bash

List sub-directories in the current directory

ls -d */


List all the sub-directories in the current directory

ls -Rl | grep "^d"


List all the sub-directories including hidden directories in the current directory

find ./ -type d 


No comments:

Post a Comment