Answer the question
In order to leave comments, you need to log in
Two large files, how to quickly grep?
There are 2 files, one for 10k lines, the other for 174kk, you need to quickly extract these 10kk from 174kk =). I used grep -vFf but it was extremely slow =(. It seems that there is a -x parameter, but I did not understand the essence of its work.
Answer the question
In order to leave comments, you need to log in
If the order of the records is not important, then
comm -2 -3 <(sort big-file) <(sort small-file) > big-file-small-file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question