From 37ccc5b7f8eaac129cfa5a229ff2c4e16d6fc929 Mon Sep 17 00:00:00 2001 From: Jokler Date: Mon, 22 Jun 2020 02:15:52 +0200 Subject: Add new scripts and update old ones --- scripts/watch-dir | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 scripts/watch-dir (limited to 'scripts/watch-dir') diff --git a/scripts/watch-dir b/scripts/watch-dir new file mode 100755 index 0000000..4fb701f --- /dev/null +++ b/scripts/watch-dir @@ -0,0 +1,8 @@ +#!/bin/sh + +inotifywait -r -m "$1" -e create -e moved_to | + while read -r path action file; do + echo "The file '$file' appeared in directory '$path' via '$action'" + done + +# vim: expandtab sw=2 ts=2 -- cgit v1.2.3-70-g09d2