Skip to content

Instantly share code, notes, and snippets.

@pjxiao
Created June 12, 2012 08:59
Show Gist options
  • Save pjxiao/2916312 to your computer and use it in GitHub Desktop.
Save pjxiao/2916312 to your computer and use it in GitHub Desktop.
create backup files
#!/bin/bash
# version control? i don't know :P
for file in filename_pattern
do
dt=`date +'%y%m%d'`
cp $file $file.$dt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment