Find command matching 2 directories

I cant figure out this :frowning:

I need to list all subdirectories of 2 folders which name match wp-content and wp-includes

i tried this:
find /home/username/public_html/ -path โ€œ/wp-content/โ€ -o -path โ€œ/wp-includes/โ€ -type d
find /home/username/public_html/ -type d -path โ€œwp-contentโ€ -o -path โ€œwp-includesโ€

but it lists files, not directories :frowning:

i think this worked :frowning:

find /home/username/public_html -iname โ€œwp-contentโ€ -o -iname โ€œwp-includesโ€ -type d -exec find {} -type d ;

if anyone please can explain where was the bug or how to do more simply, would be welcome, thx

PS: what if i want to execute an chmod for each of these found subdirectories?

find <start point> -name wp-content -o -name wp-includes -type d

Or if you donโ€™t like โ€˜findโ€™;

ls -Rl <start point> |grep "wp-\(content\|includes\):"


find <start point> -name wp-content -o -name wp-includes -type d -exec chmod 755 {} \;