Skip to content

Instantly share code, notes, and snippets.

@cjus
Last active August 29, 2015 14:25
Show Gist options
  • Save cjus/a9aa504bf79b71d93753 to your computer and use it in GitHub Desktop.
Save cjus/a9aa504bf79b71d93753 to your computer and use it in GitHub Desktop.
Timed stamp, backup command alias for .bash_profile
bkup() {
d=`date +%Y%m%d-%H%M%S`
fname=''$1-$d.tgz
tar czf $fname $1
}
@cjus
Copy link
Author

cjus commented Jul 21, 2015

Creates a timestamped tar file.
Example:

$ bkup folder

creates

folder-20150721-203239.tgz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment