find all the dirs starting with particular name

Hi Experts,

I want to find all the dirs , subdirs on the sever which start with "sr".
Can anyone let me know command for the same.

find . -type d -name sr* I tried this but it is not working.

Thanks,
Ajay

try this..

 
find . -type d -name "sr*"

thanks this checks recursive also ?
i am getting many "Permission denied" msgs how to avoid those...
actually after "sr" there can be any number from 0-9 so i precisely want to list only those which has digits after "sr".

Thanks,
Ajay

it will check recursively.. if you want to restrict for one level or two level, then you need to use -maxdepth.

if you want to look only in your directory, then

 
ls -lrt | grep "^d" | grep "sr[0-9]"

To avoid permission error messages, use this:

find . -type d -name "sr*" -print 2>/dev/null