Recursively copy a directory for backup


/ Published in: Bash
Save to your folder(s)

Kudos to http://snipplr.com/view/26670/


Copy this code and paste it in your HTML
  1. # Used to backup directory and files
  2. #1. Create the backup directory using mkdir
  3. #2.
  4. cd /source; tar cf - . | (cd /target && tar xf -)

URL: http://snipplr.com/view/26670/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.