0

I am running the following command in a data directory:

$  grep -r '0xdataH2O' ./

There are a lot of files in this folder, and I'd only like to grep recent files. Is there a way to do something like the following:

$ grep -r '0xdataH2O' ./<$files_modified_within_last_two_days>

1 Answer 1

1
find . -type f -mtime -2 -exec grep -H 0xdataH20 {} \;
2

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.