Created
May 1, 2016 19:37
-
-
Save JoeyBurzynski/7b7475e4b0dae020be857455855636df to your computer and use it in GitHub Desktop.
Bash Scripts: Back Up File With Timestamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buf () | |
{ | |
local filename=$1 | |
local filetime=$(date +%Y%m%d_%H%M%S) | |
cp -a "${filename}" "${filename}_${filetime}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment