#!/bin/bash
DIRS=$(find "$1" -type d)
for d in $DIRS
do
[ "$d" != "." -a "$d" != ".." ] && echo -e "$d $(ls $d | wc -l)\n$(ls $d)" || :
done
DIRS=$(find "$1" -type d)
for d in $DIRS
do
[ "$d" != "." -a "$d" != ".." ] && echo -e "$d $(ls $d | wc -l)\n$(ls $d)" || :
done
usage: pass the path as command line arg
ReplyDelete