# excludes all hidden folder (name beginning with "."), and "."
EXCLUDE="-not -path . -regex '.*/\..*' -prune -o "

# Find directories, optionnally filtered by name, ordered by date descendent, with a cap on the nb of results
find . -maxdepth 4 "${EXCLUDE}" -type d -regex '.*$SELECT[^/]*' -print0 \
  | xargs -0 -r stat --format '%Y:%n' | sort -nr | cut -d: -f2- | head -n +1
