The Code Cave Cold storage before my best ideas melt away…

15Feb/100

How to: Find files edited in the last day

The process is straight forwarded. There are several methods:

find . -mtime -1 \! -type d -exec ls -l {} \;

Or more simply

find . -type f -mtime -1

In my case, I wanted to do more. First since I was searching an SVN repository, I wasted to exclude all of the extra files that are touched by SVN. Additionally, the goal was to show which files contained a print_r function.

Here's what I came up with:

find . -path '*/.svn/*' -prune -o -type f -mtime -1 \
-exec echo '{}' \; -exec grep print_r {} \;

Hope that helps!

Posted by Brian

Filed under: LINUX Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.