My first solution to this was to execute date +%Y%m%d%H%M and put that format of numbers into a file, and run the script every minute from cron. Then if the date from the file matches the date command, the script would do something. Then it would update that file for the next day plus 3 minutes.
In short : I have several log files and I need to find the last file with a certain keyword in it.
# ls -1tr logs
Through Internet I found a way to examine the last, the previous and the previou