Skip to Content

Terminal Tip: Finding by Time

Have you ever lost track of a file that you were just working on? Or were you ever curious about which files an installer has just added or modified? The command line find command offers a simple way to track down any files created or updated within the last few minutes. Its amin and cmin flags tells find to locate files that changed with a certain number of minutes, e.g. to search within 10 minutes: find / -cmin -10 or find /Users/ericasadun/ -amin -3. The - before the time says to find within the time period (with, say, the last three minutes) rather than to look for exact time matches (at 3 minutes ago exactly).

Have you ever lost track of a file that you were just working on? Or were you ever curious about which files an installer has just added or...
 

Add a Comment

*0 / 3000 Character Maximum

1 Comment

Filter by:
duncan

Better yet, you can touch a file (/usr/bin/touch, not the other kind) and then find anything newer than that.

For example, touch /tmp/beforeinstall

Then after the install has run, do find / -new /tmp/beforeinstall -print

Much simpler and has the ability to be more precise.

Of course, with .pkg files you can just use lsbom...

April 27 2007 at 6:24 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.