Answer the question
In order to leave comments, you need to log in
How to set a limit on the size of files to be checked for grep?
Hello. Can you please tell me how to limit the size of the files to be checked for the grep command? Those. so that files larger than 20 mb (for example) are skipped?
Answer the question
In order to leave comments, you need to log in
Run through find - you can make a filter with findom and run grep on the files that have passed the filter.
Make the grep command an alias to a script that checks the file size before execution and only then actually greps or gives an etc error. On the other hand, this can be simply bypassed by using a design cat filename | grep
, etc.
For what purposes, in general, do you need it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question