Skip to content

Instantly share code, notes, and snippets.

@heqzha
Last active December 16, 2019 23:24
Show Gist options
  • Save heqzha/667606c383e58ade36f4cac523018e99 to your computer and use it in GitHub Desktop.
Save heqzha/667606c383e58ade36f4cac523018e99 to your computer and use it in GitHub Desktop.
backup current folder with datetime by zip
parent=`basename $(pwd)`
zip -r "$parent-$(date +"%Y-%m-%dT%H-%M-%S").zip" ./*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment