I want to locate all folders on my server that end with 'wordpress-seo'.I tried find command but it takes too long.sudo  find /home/w/s -type d -name 'wordpress-seo'Now I am trying Locate command but it returns all paths that have wordpress-seo.a/wp-content/plugins/wordpress-seoa/wp-content/plugins/wordpress-seo/languages/......I want to exclude wordpress-seo/* files and folders. I just want folder names. i.e.a/wp-content/plugins/wordpress-seob/wp-content/plugins/wordpress-seoTried regex without any luck. locate -r '/\w+wordpress\-seo/b'ORlocate '/*/wordpress-seo/'Any Help??
Locate specific folders
locate
Try this:locate -r wordpress-seo$Although i should mention that find offers huge variations of options over locate. You have found locate faster because it just reads from a database /var/lib/mlocate/mlocate.db while find search through files every time, whenever you give it something to search. locate's database is updated by cron on a daily basis, you can also update the database manually anytime by:sudo updatedbThis will make the files created after the daily cron update available in the locate database, so you will find those via locate. Also check the configuration file /etc/updatedb to see which filesystems, paths are being excluded.