Monitors a directory tree for file changes and executes specified commands when an update is detected.
- Python 3
- Allow the script to be executed:
chmod +x file_watcher.py
- Run the script:
./file_wachter.py
- Kill the script how you usually would. (Most likely
CTRL+C
)
Optional arguments (with default values):
-h display help message and exit
-p . path of directory tree to watch
-f path of file to watch
-e * extensions to watch
-c make commands to execute
-i 500 interval in milliseconds