Skip to content

Instantly share code, notes, and snippets.

@jerel
Created April 13, 2015 19:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerel/f4d8771de0147f4ead5e to your computer and use it in GitHub Desktop.
Save jerel/f4d8771de0147f4ead5e to your computer and use it in GitHub Desktop.
Bash script to clear watchman roots to solve Error: watch EMFILE
watchman watch-list | tr -d '[:space:]' | grep -Po '(?<="roots":\[).*?(?=\])' | grep -Po '(?<=").*?(?="?,)' | while read path; do watchman watch-del "$path"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment