blob: f5eafef57f22b9d346f0df5bef8c62f55b24941c (
plain) (
tree)
|
|
#!/bin/sh
# Count all descendants of given directories; don't follow symlinks
for dir in "${@:-.}" ; do
if ! [ -d "$dir" ] ; then
printf >&2 'cfr: %s: Not a directory\n' "$dir"
ex=1
continue
fi
printf '%u\t%s\n' \
"$(find "$dir" -type d -exec cf -o -- {} \; | tot)" \
"$dir"
done
exit "${ex:-0}"
|