3

Searching a particular string pattern in 10000 files

view full story
linux-howto

http://www.unix.com – Problem Statement:- I need to search a particular `String Pattern` in around `10000 files` and find the records which contains that `particular pattern`. I can use `grep` here, but it is taking lots of time. Below is the command I am using to search a `particular string pattern` after `unzipping` the `dat.gz file` Code:     gzcat /data/newfolder/real-time-newdata/*_20120809_0_*.gz | grep 'b295ed051380a47a2f65fb75ff0d7aa7^]3^]-1' If I simply count how many files are there after unzipping the above `dat.gz file` Code: gzcat /data/newfolder/real-time-newdata/* (HowTos)