From 03d96732eb9957f36c5ec4375d3f94320a0809f3 Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 12 Aug 2023 21:10:47 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20backup-mtime:=20print=20out=20a=20s?= =?UTF-8?q?hell=20script=20to=20restore=20mtimes=20to=20the=20current=20st?= =?UTF-8?q?ate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backup-mtime | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 backup-mtime diff --git a/backup-mtime b/backup-mtime new file mode 100755 index 0000000..1ae30f0 --- /dev/null +++ b/backup-mtime @@ -0,0 +1,7 @@ +#!/bin/sh +# print out a shell script to restore mtime to the current state +# +# (may need gnu coreutils.) +# +find "$@" -exec \ + stat --format="touch --no-dereference -m -d '%y' '%n'" {} \;