Skip to content

Instantly share code, notes, and snippets.

@huskercane
Created July 29, 2014 15:03
Show Gist options
  • Select an option

  • Save huskercane/dc9cec512dab502c8c80 to your computer and use it in GitHub Desktop.

Select an option

Save huskercane/dc9cec512dab502c8c80 to your computer and use it in GitHub Desktop.
Function to backup files with current date and time
function backupfile(){
OF=$1-$(date +%Y%m%d-%H:%M:%S)
cp $1 $OF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment