Skip to content

Instantly share code, notes, and snippets.

@jscottarmstrong
Created April 29, 2020 13:56
Show Gist options
  • Save jscottarmstrong/7b8e7932817c083001fdd42b4de464b1 to your computer and use it in GitHub Desktop.
Save jscottarmstrong/7b8e7932817c083001fdd42b4de464b1 to your computer and use it in GitHub Desktop.
Simple bash script to read lines from a file and tell macOS Time Machine to ignore those directories. Directory paths are relative to the .tmignore file.
#!/bin/bash
while read f; do
tmutil addexclusion $f
tmutil isexcluded $f
done < .tmignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment