#!/bin/bash SOUBOR="$1" SOUBOR=`pwd`/$SOUBOR if [ -e "$SOUBOR" ]; then CAS=`stat -c %Y $SOUBOR` TOUCHDATE=`date -d "@"$CAS +"%y%m%d%H%M.%S"` read -p "Modify your file and press any key when done to restore its timestamp... " -n1 -s touch -t $TOUCHDATE $SOUBOR echo exit 0 fi echo "Please specify filename you want to keep its timestamp" exit 1