Linux - Ls command to list only directories, Ls command to list directories

Ls command to list only directories

Linux ls command to list directories alone

Sometime we might need to list only the directories.

ls command to list only directories
  #  ls -ad */
The above command will list only the directories and the hidden directories.

Output:
Desktop/  Documents/  Download/  Music/  Pictures/


ls command to list directories and hidden directories alone
  #  ls -ad */ .*/

Output:
./       .ccache/  Documents/  .gconfd/       Music/           
../      .config/  Download/   .filezilla/   .gegl-0.0/              
.adobe/  .dbus/    .fontconfig/.gvfs/        
.cache/  Desktop/  .gnome2/      .mozilla/    Pictures/        

The topic on Linux - Ls command to list only directories is posted by - Honey

Hope you have enjoyed, Linux - Ls command to list only directoriesThanks for your time

Tech Bluff