Recursively copy a directory for backup

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

Kudos to

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 -)


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.