If I do find . -mmin -1 find . -mmin -1 , I get "myfile", which was changed in the last minute.
But when I want to find a specific line in this file by doing
grep 'myString' myfile -mmin -1
I get an invalid max count error message
I also tried
find . -name "myfile" -exec grep 'myString' myfile -mmin -5
I get the error find: missing argument to -exec
So my question is: How do I grep or cat only the changes within a file which happened in last 5 mins. Now that I know the file name which was modified during that period. How do I grep or cat only the changes within a file which happened in last 5 mins. Now that I know the file name which was modified during that period.
Suggestions? Thanks in adv.
source share