December 7, 20223 yr I just implemented an instance of Mayan EDMS as a document manager. It's a destructive file manager. Everything added to the import folders are renamed to a unique identifier, file extension is stripped, it's copied to the app storage folder, and the original file in the import folder is deleted. Is there a way I can get every file added to the import folder immediately copied to a backup folder? I'd like it to happen as soon as it's added.
December 14, 20223 yr Not exactly the same, but I used a find command that checks a folder and it copies from A to B and moves to C. find /mnt/cache/uploads/incoming/* -iname "*.mkv" -type f -mmin +10 -exec cp {} /mnt/cache/uploads/2check/ \; -exec mv {} /mnt/cache/uploads/Tv-Incoming/ \; So it checks Incoming folder and copies to 2check then moves incoming to Tv-incoming So this kinda does what your asking, but not exactly. You could look for some code that utilizes inotifywait
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.