do you mean it should be find "${mDir}" and not find ${mDir}?
does the {} mean you can attach other things to it?
thanks!
#!/usr/bin/ksh
find /home -type d | while read mDir; do
mTot=$(find "${mDir}" -type f | wc -l)
if test $mTot -gt 2000
then
echo "${mDir}:${mTot}"
fi
done
i think this works
it just takes a little while to get started (but psosibly due to a lot of files, i guess it cant be any faster than this)
thanks
---------- Post updated at 04:18 PM ---------- Previous update was at 04:16 PM ----------
sometimes it says that a directory cant be found, strange
find: /home/bbweb/public_html/media/categories/Signatures: No such file or directory
also when counting files,
can it only count what is directly under it? (either files or files + directories)
for example, it shows a lot of files under /home/vashleyb even though there are only 20 files + directories under it
/home/vashleyb should show a small number like 20 (either # of files or directories directly under it), and not the total # of files of everything under it
thanks
/home/vashleyb:16678
/home/vashleyb/public_html:16490
/home/vashleyb/public_html/gallery:12825
/home/vashleyb/public_html/gallery/albums:10569
/home/vashleyb/public_html/gallery/albums/userpics:5452
/home/vashleyb/public_html/gallery/albums/userpics:5452
---------- Post updated at 04:37 PM ---------- Previous update was at 04:18 PM ----------
i put in -maxdepth 1
mTot=$(find "${mDir}" -type f -maxdepth 1 | wc -l)
which is ok now
its trying to find some directories that dont exist though, not sure why
find: /home/ultbrit/public_html/photos/albums/Ontour/Babyonemoretime/July 06 1999 - Washington DC: No such file or directory
find: /home/ultbrit/public_html/photos/albums/Ontour/House of Blues: No such file or directory