Skip to Content
gnux

-d, --date

Parse STRING and use it instead of current time.

An option of touchx.

Usage

touchx -d STRING FILE...
touchx --date=STRING FILE...

Details

ShortLongValueDefaultMeaning
-d--dateSTRINGparse STRING and use it instead of current time

Examples

Set only the modification time to a specific date

touchx -m -d '2024-01-02 15:04:05' report.pdf

Use an RFC 3339 timestamp, or seconds since the epoch

touchx -d 2024-06-01T12:00:00Z release.txt && touchx -d @0 epoch.txt

Stamp all sources with one fixed date for a reproducible archive

touchx -d 2024-01-01 src/*.go
touchx -h -d 2024-01-01 link.txt

Help in the terminal

gnux help touchx --date

On this page