#!/usr/bin/env bash is_empty() { while read -r; do [ ! -d "$REPLY" ] && [ -s "$REPLY" ] && return 1 done < <(find ${1:-.}) return 0 } is_empty "$@"