Search files modified in the last hour

I recently had the necessity to use this useful command to search all the files changed or created in the last hour on a linux box (it works on Mac OS too!!)

find . -mmin -60

where

. is the search path and in this case is the folder in which you are (you can get this info by using pwd command)

together with -mmin you can combine or replace with other options like the ones below

OptionMeaningUnitExample
-aminwhen the file was last accessedminutesfind . -amin -20 (file accessed in the last 20 mins)
-atime when the file was accesseddaysfind . -atime -2 (files accessed in the last 2 days)
-cminwhen the file was createdminutesfind . -cmin -3 (files created in the last 3 minutes)
-ctime when the file was created daysfind . -ctime -3 (files created in the last 3 days)
-mmin when the file was modified minutesfind . -mmin -3 (files modified in the last 3 minutes)
-mtimewhen the file was modified portion of a daypossible values are:
– -1: last 24 hours
– -0.5: last 12 hours
– -0.25: last 6 hours

Hope it helps!

d3

d3 is an experienced Software Engineer/Developer/Architect/Thinker with a demonstrated history of working in the information technology and services industry. Really passionate about technology, programming languages and problem solving. He doesn't like too much the self celebration and prefers to use that time doing something useful ...i.e. coding

You may also like...