Hi,
I’m looking for a package that will allow me to configure some rules for moving folders and then watch a folder and automatically move folders or files that match rules to a certain other directory. Does something like this exist?
The use case is that I have data being saved to a single directory by other devices, and then I would like to reorganize it based on the file or folder name.
Or anyone have any other ideas of how to do this?
systemd-path is the cleanest and most portable solution. You define a path service to watch your directory for changes and trigger another service to perform certain actions then. It uses inotify.
https://man.archlinux.org/man/systemd.path.5.en
Here is a full example from our currently so beloved redhat: https://www.redhat.com/sysadmin/introduction-path-units