From f42d28088c85b20dbc41e9e09481578366a9c40a Mon Sep 17 00:00:00 2001 From: ImmortalPC Date: Mon, 25 Nov 2013 13:44:30 +0100 Subject: [PATCH] [Change] grep Add find in files --- cheatsheets/grep | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cheatsheets/grep b/cheatsheets/grep index cd79eb5..aeb2de3 100644 --- a/cheatsheets/grep +++ b/cheatsheets/grep @@ -9,3 +9,7 @@ grep -R pattern folder # Getting pattern from file (one by line): grep -f pattern_file file + +# Find all files who contain {pattern} in the directory {directory}. +# This will show: "file:line my research" +grep -rnw 'directory' -e "pattern"