If I do a
find . -mmin -1
grep 'myString' myfile -mmin -1
invalid max count
find . -name "myfile" -exec grep 'myString' myfile -mmin -5
find: missing argument to -exec
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.
Grep doesn't have an mmin argument as far as I can see. It does have a -m argument with a number parameter.
grep 'myString' myfile -m3 will stop after 3 lines containing myString. So, the error message means that 'min' in
-mmin is not a valid maximum count.