And we want do it fast!
# this ignores the directory itself, counting ONLY the files that exist in that directory
find $DIR -mindepth 1 -maxdepth 1 -printf '\0' | wc -c
Want it even faster? Here are the options:
And we want do it fast!
# this ignores the directory itself, counting ONLY the files that exist in that directory
find $DIR -mindepth 1 -maxdepth 1 -printf '\0' | wc -c
Want it even faster? Here are the options: