help in find command in linux

I am trying to find pictures which contains a specific word in the file name.
For example any .JPG files that contains "lm" at the beginning or at the middle or at the end of the file name.

find / -iname "*.jpg"  | ...

what should go after the pipe?

regards,
Moaathe

Hi.

I don't think you need a pipe.

find / -iname "*lm*.jpg"

A couple of things that might bug you: find won't follow symbolic links by default; find will drill into filesystems you might wish it hadn't (such as a network filesystem or other, in-memory or special, filesystems). You can control all of that from options you will find in your find man page.

1 Like

that was very helpful
thank you so much