check if dir is empty

How do I check whether a directory is empty or not under Linux / UNIX using a shell script? I’d like to take some action if directory is empty.

{ 38 comments }