Everywhere All articles Download

Command line and power tools

Editing timestamps

Updated 2026-07-31 · 4 min read

Sometimes the timestamp is wrong and the file is right — scans dated by the scanner, photos dated by the copy.

Modification time: touch

touch -mt 202503151430 report.pdf     # 15 Mar 2026, 14:30... format: YYYYMMDDhhmm
touch -t 202503151430 report.pdf      # sets access time too

Reference another file's date instead of typing one:

touch -r original.pdf copy.pdf

Creation date

touch cannot move a creation date earlier (macOS adjusts it only if the new mtime predates it — setting an older mtime does drag creation back with it, which usually is what you want). For explicit control, Xcode's tools ship SetFile:

SetFile -d "03/15/2026 14:30:00" report.pdf    # creation
SetFile -m "03/15/2026 14:30:00" report.pdf    # modification

SetFile requires the Command Line Tools (xcode-select --install) and is formally deprecated but still present and functional.

Photos are different

Image dates live in EXIF metadata inside the file, and photo apps trust EXIF over filesystem dates. Rewriting those:

brew install exiftool
exiftool "-AllDates=2019:07:04 12:00:00" IMG_2041.jpg

exiftool is the standard; it can also copy dates between files and shift whole folders by an offset (the camera-clock-was-wrong fix).

Legitimate uses

Correcting scanner output dated today for a 2019 document; restoring dates mangled by a copy through a date-flattening filesystem; making a batch of exports sort in intended order. Search and Smart Folders filter on these dates — fixing them is what makes date-based search tell the truth.

Common questions

How do I change a file's modification date?

touch -mt YYYYMMDDhhmm file — or -r to copy another file's timestamp.

How do I fix wrong dates on photos?

Edit the EXIF, not the file dates: exiftool's AllDates tag is what photo apps read.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Download for Mac

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Articles Privacy Support