If you’re only targeting a specific file type include its extension (e.g. Make sure to change 201212211111 to the date you want and to replace /Volumes/Mac\ HD/Pictures/Album with the proper path to the folder containing the files you wish to alter the date for.ĥ. Here’s an example of what should be typed into the Terminal at this point: touch -t 201212211111 /Volumes/Mac\ HD/Pictures/AlbumĢ01212211111 in the example above represent “Decem11:11 AM”. Open a Finder window and locate the folder containing the files 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: touch -t 201212211111Ĥ.
![osx terminal find files by date osx terminal find files by date](https://i.ytimg.com/vi/1jnq62otU6k/maxresdefault.jpg)
Don’t store files in this folder if you don’t want them to be modified.ģ. Make sure all the files you want to modify are in the top directory of the same folder.
Osx terminal find files by date how to#
How to batch update the “date created” attribute of multiple files? Warning: This will change both the “date modified” and “date created” attributes.ġ. Your command should look something like this: touch -mt 200801120000 /Volumes/Mac\ HD/Pictures/Album /*Ħ. Here’s an example of what should be typed into the Terminal at this point: touch -mt 200801120000 /Volumes/Mac\ HD/Pictures/Albumĥ.
![osx terminal find files by date osx terminal find files by date](https://videos.files.wordpress.com/60HqxARs/blog_terminal_1_hd.original.jpg)
Type this into Terminal (without hitting enter/return) replacing YYYYMMDDhhmm with the desired date information: touch -mt YYYYMMDDhhmmĤ. Open up the Terminal application ( /Applications/Utilities/Terminal.app) or if you prefer use iTerm.ģ. Don’t store files in this folder if you don’t want them to be modified.Ģ.
![osx terminal find files by date osx terminal find files by date](https://www.howtogeek.com/wp-content/uploads/2014/08/find-linux-system-installation-date.png)
How to batch update the “date modified” attribute of multiple files? 1. Make sure to change 201212211111 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.īelow is supplementary information on how to batch modify/update/change files using the commands above. Here’s an example of what should be typed into the Terminal at this point: 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 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: touch -t 201212211111ģ. Open up the Terminal application ( /Applications/Utilities/Terminal.app) or if you prefer use iTerm.Ģ. 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.Ĥ. Here’s an example of what should be typed into the Terminal at this point: touch -mt 200801120000 /Volumes/Mac\ HD/Pictures/somefile.jpgĢ00801120000 in the example above represents “Januat 12:00 AM” or my twenty-first birthday. Type this into Terminal (without hitting enter/return) replacing YYYYMMDDhhmm with the desired date information: touch -mt YYYYMMDDhhmmģ. How to change the “date modified” attribute of a file? 1. mm - The number indicating minutes, from 0 to 59.
![osx terminal find files by date osx terminal find files by date](http://macintopics.com/media/2010/06/Terminal-Basic-Commands.png)
MM - The month of the year, from 1 to 12.
Osx terminal find files by date 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). 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. How to Change a File’s Last Modified and Creation Dates on Mac OS X