#!/usr/bin/ruby # ## https://rosettacode.org/wiki/File_modification_time # var file = File.new(__FILE__); say file.stat.mtime; # seconds since the epoch # keep atime unchanged # set mtime to current time file.utime(file.stat.atime, Time.now);