Use this example to chmod only directories

ls -R <path to some directory> |grep ":$"|sed 's/:$//'|xargs chmod g+x 
ls -R <path to some directory> |grep ":$"|sed 's/:$//'|xargs chmod o+x