Tente:
find "$TARGET_DIR//." \( -name . -o -prune \) -type d -exec sh -c '
for f do
f=${f%//.}
f=${f%"${f##*[!/]}"}
f=${f##*/}
printf "(DIR) %s\n" "${f:-/}"
done' sh {} +
Seria mais simples para o equivalente a -mindepth 1 -maxdepth 1
:
find "$TARGET_DIR//." \( -name . -o -prune \) -type d -exec sh -c '
for f do
printf "(DIR) %s\n" "${f##*/}"
done' sh {} +
Para o segundo:
find "$TARGET_DIR//." ! -name . -prune -type f -exec sh -c '
for f do
size=$(($(wc -c < "$f") +0)) || continue
printf %s "$size ${f##*/} "
file -b -- "$f"
done' sh {} +