Created
December 5, 2020 01:29
-
-
Save BoredHackerBlog/665540695e8e7e92489d4a1850d8bdd0 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
# This is for monitoring a folder (recursive) and copying files that were saved into a new folder | |
# apt install inotify-tools | |
# https://linux.die.net/man/1/inotifywait includes events | |
# command below does copy after close_write event | |
inotifywait -q -m -r -e close_write --format '%w%f' myfiles/ | while read afile; do cp --parents -r $afile /tmp/; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment