This command will search the working directory recursively for any files with the word “sample” and output to the screen.

find . -type f -exec grep -l “sample” {} +

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post Navigation