← Useful Tips
Linux / WSLLinux

grep -RIl "keyword" .: List only files containing a search term

Use grep -RIl "keyword" . to list only files containing a search term. It is especially handy when you live in terminals and repeat long commands.

grep -RIl "keyword" .

Why it helps

Use grep -RIl "keyword" . to list only files containing a search term. It is especially handy when you live in terminals and repeat long commands.

How to use it

  1. Open the relevant app or terminal.
  2. Use the shortcut or command above in the relevant context.
  3. Check the result; for commands that change data, test on a small example first.
People also search for
grep -RIl "keyword" .: List only files containing a search termgrep -RIl "keyword" .list only files containing a search termhow to list only files containing a search termLinux / WSL list only files containing a search term

Related tips