Skip to content

Instantly share code, notes, and snippets.

View AVAtarMod's full-sized avatar
💎
Learning

Grigory Stupnikov AVAtarMod

💎
Learning
View GitHub Profile
@AVAtarMod
AVAtarMod / onchange.sh
Last active August 19, 2021 06:59 — forked from senko/onchange.sh
Watch entered directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
# Modified by: Grigory Stupnikov
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#