Search the root directory (/) for directories (type d) up to a maximum depth of 5, and for each directory found, execute the command "sed -i 's/[A-Z]/x/g' {} ';'" which will replace all uppercase letters with the letter x.
find / -maxdepth 5 -type d -exec sed -i 's/[A-Z]/x/g' {} ';'