Created
December 6, 2012 17:23
-
-
Save harushimo/4226277 to your computer and use it in GitHub Desktop.
bash script
This file contains hidden or 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
#!/bin/bash | |
#Source and Target | |
source="$HOME/Downloads" | |
current_date=`date"+%m_%d_%y"` | |
target="$HOME/backup/${current_date}_back.tar.gz" | |
#Creating backup.tgz file to back up directory | |
tar -cvzf "$target" --exclude="$target" "$source" | |
Error Message | |
/backup.sh: line 5: date+%m_%d_%y: command not found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment