Tuesday, August 24, 2010

sort grep results by time

I know an in-efficient way to do this. First sort the files, by time, and then run grep on each file:


$ ls -1rt | xargs grep -a stuff-to-grep-for

No comments:

Post a Comment