Skip to content

Instantly share code, notes, and snippets.

@greenkey
Created January 30, 2015 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greenkey/bae91efd3905a18a399c to your computer and use it in GitHub Desktop.
Save greenkey/bae91efd3905a18a399c to your computer and use it in GitHub Desktop.
poor man's backup script
#!/bin/bash
while IFS=, read -r from to
do
echo copying from $from to $to
cp -vufr "$from" "$to" 2>> ~/cperrors.txt
done <<EOF
/home/myuser/important_files/,/media/myuser/externalHD/backup/important_files
/home/myuser/another_dir/,/media/myuser/externalHD/backup/another_dir
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment