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-seo
a/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-seo
b/wp-content/plugins/wordpress-seo
Tried regex without any luck.
locate -r '/\w+wordpress\-seo/b'
OR
locate '/*/wordpress-seo/'
Any Help??
locate
will work? Seems to me it reads from a system database of system files and not from the real directories... – gogoud Mar 17 '15 at 18:29