Views: 38
0 0
Read Time:54 Second

I recently had the necessity to use this useful command to search Linux files changed or created in the last hour (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!

cc4ae2d7d0e2367495d9f75c31beef8e?s=400&d=robohash&r=g Search Linux files modified in the last hour

About Post Author

brewedbrilliance.net

Experienced software architect with a spasmodic passion for tech, software, programming. With more than 20years of experience I've decided to share all my knowledge in pills through this blog. Please feel free to contact me if there is any topic that you would love to cover
happy Search Linux files modified in the last hour
Happy
0 %
sad Search Linux files modified in the last hour
Sad
0 %
excited Search Linux files modified in the last hour
Excited
0 %
sleepy Search Linux files modified in the last hour
Sleepy
0 %
angry Search Linux files modified in the last hour
Angry
0 %
surprise Search Linux files modified in the last hour
Surprise
0 %

Share this content:

By brewedbrilliance.net

Experienced software architect with a spasmodic passion for tech, software, programming. With more than 20years of experience I've decided to share all my knowledge in pills through this blog. Please feel free to contact me if there is any topic that you would love to cover

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x