Here find command is executing the grep and passing file name with path where curly braces ({}) are placed.
$ find . -type f -exec grep -il "pattern" {} \;
Here grep command is searching for the pattern in all the files given as argument, but files are given by find command using back tic(``)
$ grep -il "pattern" `find . -type f`
Below command is very much useful when number files to search in exceeds 256.
xargs will give 10 files at a time to grep.
$ find . -type f|xargs grep -il "pattern"
1 comment:
Hi Khaliq,
How are you? Hope you remember me..I am Guna and I worked with you in i2 tech
Post a Comment