Created
March 6, 2018 17:34
-
-
Save bluefangs/14c521a966459fdf1a64a1d38da4ebed to your computer and use it in GitHub Desktop.
This file contains 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
inotifywait -m /home/test -e create | | |
while read path action file; do | |
echo "The file '$file' appeared in directory '$path' via '$action'" | |
mv $path$file /home/test/archive/ | |
# do something with the file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment