Skip to content

Instantly share code, notes, and snippets.

@oxUnd
Created May 17, 2013 14:40
Show Gist options
  • Save oxUnd/5599475 to your computer and use it in GitHub Desktop.
Save oxUnd/5599475 to your computer and use it in GitHub Desktop.
备份
#!/usr/bin/env sh
f=$1
if [ "$f" = "" ]; then
echo 'Usage: bak <f>'
exit 1
fi
t=$(date "+%Y_%m_%d_%H_%M_%S")
cp -rf $f $f-$t.bak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment