Quantcast
Viewing all articles
Browse latest Browse all 41

Answer by Daniele Santi for How do I grep a string from files created within the last 5 hours?

You can use find to return only the files created in the last 5 hours and use its exec function to grep from them:

find [PATH_OF_DIRECTORY] -type f -cmin -300 -exec grep "Quality data" {} \;

where -cmin -300 means "created in the last 300 minutes (5h)"


Viewing all articles
Browse latest Browse all 41

Trending Articles