List only directories names which match a pattern July 31, 2023 by Tarik You are probably after the -d switch of ls: ls -d *pattern*/ ls --directory *pattern*/