Forrest logo
back to the find tool

find:ai:f648b

How to find all files that contain "text" in the filename
$ find /path/to/search -type f -name '*text*'
try on your machine

This command uses the 'find' utility to search for files in the specified directory (/path/to/search) that contain 'text' in their filename. The '-type f' flag restricts the search to only files, and the '-name' flag specifies the pattern to match in the filename.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • How to find all files that contain "text" in the filename?
back to the find tool