
- #Find files by date range in os x terminal how to#
- #Find files by date range in os x terminal for mac os x#
Touch -t 201212211111 /Volumes/Mac\ HD/Pictures/somefile.jpgĢ01212211111 in the example above represent “Decem11:11 AM” or the end of the 5,125 years that comprise the “Great Cycle” in the sacred Tzolk’in calendar of the Maya (and you can relax the world didn’t end then - and I didn’t think it would when I wrote this article!). Open up the Terminal application ( /Applications/Utilities/Terminal.app) or if you prefer use iTerm.
#Find files by date range in os x terminal how to#
How to change the “date created” attribute of a file? Warning: This will change both the “date modified” and “date created” attributes.ġ.

Make sure to change 200801120000 to the date you want and to replace /Volumes/Mac\ HD/Pictures/somefile.jpg with the proper path to the file you wish to alter the date for.Ĥ. Touch -mt 200801120000 /Volumes/Mac\ HD/Pictures/somefile.jpgĢ00801120000 in the example above represents “Januat 12:00 AM” or my twenty-first birthday. Here’s an example of what should be typed into the Terminal at this point: Open a Finder window and locate the file you wish to modify and drag and drop it into the Terminal window. Type this into Terminal (without hitting enter/return) replacing YYYYMMDDhhmm with the desired date information:ģ. Open up the Terminal application ( /Applications/Utilities/Terminal.app) or if you prefer use iTerm.Ģ. How to change the “date modified” attribute of a file?1.

#Find files by date range in os x terminal for mac os x#
Since then these directions have been updated for Mac OS X 10.10 Yosemite.ĭate Format Key:YYYY - The year (the first two digits/century can be omitted).MM - The month of the year, from 1 to 12.DD - The day of the month, from 1 to 31.hh - The hour of the day, from 0 to 23.mm - The number indicating minutes, from 0 to 59. This a very simple guide on how to change a file’s “date modified” and “date created” attributes on Mac OS X I wrote back in May 2009.
