Skip to content

Instantly share code, notes, and snippets.

@OBdA
Created January 18, 2013 12:23
Show Gist options
  • Save OBdA/4564267 to your computer and use it in GitHub Desktop.
Save OBdA/4564267 to your computer and use it in GitHub Desktop.
#! /bin/sh
[ -e "$1" ] || exit 1
[ -e "$1.retouch" ] && ( touch -r "$1.retouch" "$1"; rm -f "$1.retouch"; : ) && exit 0
touch -r "$1" "$1.retouch" && exit 0
#EOF
@OBdA
Copy link
Author

OBdA commented Jan 18, 2013

Little Script to restore time stamps after modifing a file. Just run it once before and after the change with the file name as the only parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment