Last active
October 26, 2016 21:25
-
-
Save lhotari/07e4c206673b85d13a3318c802b8591c to your computer and use it in GitHub Desktop.
This file contains 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 | |
# Disables Spotlight / mdworker and Time Machine backups for all build and .gradle directories under the working directory. | |
/usr/bin/find . '(' -name build -or -name .gradle ')' -exec touch "{}/.metadata_never_index" \; | |
/usr/bin/find . '(' -name build -or -name .gradle ')' -exec xattr -w com.apple.metadata:com_apple_backup_excludeItem com.apple.backupd "{}" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Disables Spotlight / mdworker and Time Machine backups for all
build
and.gradle
directories under the working directory.