#!/bin/sh now=`date '+%Y-%m-%dT%H:%M:%S'` for i in "$@" do mv "$i" "$i.$now" && cp -p "$i.$now" "$i" done