This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |