JJ Beck JJ Beck - 1 year ago 121
Linux Question

Linux find file names with given string

I'm on Ubuntu, and I'd like to find all files in the current directory and subdirectories whose name contains the string "John". I know that

can match the content in the files, but I have no idea how to use it with file names. Any help would be appreciated.

Answer Source

Use the find command,

find . -type f -name "*John*"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download