find /home/john/public_html/gallery/data/ -type d -execdir bash -c 'ls {}/*photos.dat >/dev/null 2>&1 || pwd' \;