goal:
find files
1 from 2010 - ie older than 400
2 with "scallix" in the file name
3 with 1738 in the file contents
1. i used http://www.timeanddate.com/date/durationresult.html?m1=06&d1=01&y1=2010&m2=2&d2=15&y2=2012
to calculate the mtime
2. i used http://www.linuxquestions.org/questions/general-10/file-creation-date-in-linux-473684/ to tell me about mtime
3. i used http://www.itworld.com/it-managementstrategy/106032/how-to-grep-tricks-linux-users to look at combining grep with find
4. result:
find . -mtime +400 -name "*scallix*" -exec grep 1738 '{}' \; -print
find files
1 from 2010 - ie older than 400
2 with "scallix" in the file name
3 with 1738 in the file contents
1. i used http://www.timeanddate.com/date/durationresult.html?m1=06&d1=01&y1=2010&m2=2&d2=15&y2=2012
to calculate the mtime
2. i used http://www.linuxquestions.org/questions/general-10/file-creation-date-in-linux-473684/ to tell me about mtime
3. i used http://www.itworld.com/it-managementstrategy/106032/how-to-grep-tricks-linux-users to look at combining grep with find
4. result:
find . -mtime +400 -name "*scallix*" -exec grep 1738 '{}' \; -print
Comments