Skip to content

Instantly share code, notes, and snippets.

@FirePanther
Last active December 10, 2016 02:58
Show Gist options
  • Save FirePanther/a62e464e7cb8d3e038ae738c42fcc371 to your computer and use it in GitHub Desktop.
Save FirePanther/a62e464e7cb8d3e038ae738c42fcc371 to your computer and use it in GitHub Desktop.
I recently moved to another Domain (from suat.be to su.at). This cron script automatically adds a "suat.be" Finder tag to all files which contains this string (so I can replace it with su.at)
# you will need https://github.com/jdberry/tag for finder tags (and correct the path)
{
grep -rlI --null "suat.be" --exclude-dir=".git" --exclude-dir="Library" --exclude-dir="Mail Attachments" --exclude-dir="Paperwork" --exclude="*.log" --exclude="*.eml" --exclude="minibackups.sh" "$HOME" | xargs -0 .../execs/tag -a "suat.be"
} &> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment