This question already has an answer here:

Imagine I only know a part of the name of the folder(s) or file(s), but don’t know their location(s) in the computer. I even don’t know whether they are hidden or not. How can I search and list them all?

(Say, for example I want to list all the folders and files which are having mysql as the part of their name)

marked as duplicate by goldilocks, cuonglm, Ulrich Dangel, Anthon, Karlson Jul 17 '14 at 18:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    find is your friend: on command line, type man find. – ctrl-alt-delor Jul 17 '14 at 16:32

Maybe something like:

find / -name "*mysql*"

Or, to find case-insensitively:

find / -iname "*mysql*"

Only files? Then:

find / -type f -name "*mysql*"

Or just directories?

find / -type d -name "*mysql*"

Maybe you want to skip other filesystems, like those in /proc or /sys:

find / -xdev -name "*mysql*"

As @richard said in a comment, you should read the man page of find to find (pun intended) all it can do.

Not the answer you're looking for? Browse other questions tagged or ask your own question.