Skip to content

Instantly share code, notes, and snippets.

@fcharlier
Created June 6, 2012 15:20
Show Gist options
  • Save fcharlier/2882559 to your computer and use it in GitHub Desktop.
Save fcharlier/2882559 to your computer and use it in GitHub Desktop.
Notes/Tips
  • Run a command each time the specified file is created (default behavior when saving a file in most editors):

    while inotifywait -e create <some/file.ext>; do <command>; done
    
  • Run a command each time a file is created (default behavior when saving a file in most editors) somewhere beneath the specified directory:

    while inotifywait -e create -r <some/directory>; do <command>; done
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment