Hmm... the -prune option is supposed to be what prevents going into subdirectories! At least, it works on ksh... what shell are you using? Ygor had a great work-around idea, but I'd think it would be faster if there's a ton of subdirectories to use -prune, rather than grabbing all the files in all the subdirectories, then eliminating everything except the current directory.
With
find . -mtime +30 \( ! -name . -prune \)
a candidate entry in . must first pass the "-mtime +30" test. Only then do we see if we want to prune it or not.
You must have a very old grep. -E is required by posix. It allows extended regular expressions. You might have an egrep program that can do extended regular expressions.
maxdepth 0 has maximum of one line of output -- TITS. (Try It To See)
maxdepth -1 outputs the contents of one directories, without recursing into subdirs.
At least, seems that way to me
A use that I have found for the prune option is to find everything in a directory but skip version controlling dirs and their contents, eg folders named .csv or .svn.
find . -type d -name .svn -prune -false -o -type f