Finding files

Hello guys,

Please your help, i need to find all the files writed in the last 5 minutes, but without create another file using touch (like im doing right now):

I am doing this:

  anio=`date +%Y`
  mes=`date +%m`
  dia=`date +%d`
  hora=`date +%H`
  minuto2=`date +%M`

  minuto=`expr $minuto2 - 5`

  fecha=$anio$mes$dia$hora$minuto
  
  touch -t $fecha dummyfile

  find . -name "*.trazas" -newer dummyfile

But if the date is for example 19:00 when i run my shell the variable minuto becomes -5 and there is an error in command touch.

Is there anny way to find directly files writed since the last 5 minutes?

If your version of find supports the -mmin flag, then use

find . -name "*.trazas" -mmin 5

Otherwise you'll have to do horrible time arithmetic. Maybe the FAQ has something
http://www.unix.com/answers-frequently-asked-questions/13785-yesterdays-date-date-arithmetic.html