Created
April 13, 2015 19:13
-
-
Save jerel/f4d8771de0147f4ead5e to your computer and use it in GitHub Desktop.
Bash script to clear watchman roots to solve Error: watch EMFILE
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
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