Skip to content

Instantly share code, notes, and snippets.

View michaljuris's full-sized avatar

Michal Juriš michaljuris

  • Prague, Czech Republic
View GitHub Profile
#!/bin/bash
#
# Pre-requesite is that GNU linux findutils package is installed (brew install findutils) for gfind
# Should be possible to just use find but I have not tested it (should just omit -daystart)
#
BACKUP_LOCATION=$(tmutil machinedirectory)
#MACHINE_NAME=$(scutil --get ComputerName)
DAY_AGE=30
if [ ! -d "${BACKUP_LOCATION}" ]; then