Skip to content

Instantly share code, notes, and snippets.

@rharkanson
Created November 12, 2016 06:14
Show Gist options
  • Save rharkanson/b5ebf5111901dc7bf25366d0d3aa2da2 to your computer and use it in GitHub Desktop.
Save rharkanson/b5ebf5111901dc7bf25366d0d3aa2da2 to your computer and use it in GitHub Desktop.
A modified backup script that removes deleted files older than 30 days, from https://www.youtube.com/watch?v=tG4Tge11GOo
#!/bin/bash
rsync -rlpgoD -progress /Volumes/Storage01/pictures /Volumes/Backup01
find /Volumes/Backup01/* -mtime +30 -exec rm {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment