On Wed, Nov 16, 2022 at 5:18 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote: > > Best advice googling for such a test is this: > > [ -d "$dir" ] && [ -n "$(ls -A $dir)" ] # If true, > dir isn't empty. Try this: [[ -n $dir(#qNF) ]] && print -r -- "$dir is a non-empty directory" This requires extended_glob. Roman.