Find file name which contain a centrain string using grep and find

If you only want to find the file names that have a centrain string without showing the matching line:

root@server:/# find . -type f -print0 | xargs -0 grep -l "string"

 

2 przemyślenia nt. „Find file name which contain a centrain string using grep and find”

  1. very interesting details you have remarked, regards for putting up.
    I like this weblog its a master peace ! .
    Lovely just what I was looking for.
    wohh just what I was looking for, thanks for posting .

  2. I’m trying to find a way to scan my entire Linux system for all files containing a specific string of text. Just to clarify, I’m looking for text within the file, not in the file name.

Możliwość komentowania jest wyłączona.