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?

  • @INeedMana
    link
    1
    edit-2
    1 year ago

    I guess that there should be some tool exactly for that but I couldn’t find it quickly

    • You might want to take a look at filebeat, maybe that will fit your use-case. I take the part “automatically move folders or files that match rules to a certain other directory” verbatim and think it’s not. Filebeat is rather to ingest logs and stream these elsewhere
    • you could configure rules for your files in logrotate but it can only be executed hourly
    • or just write a bash function/script that does the move/decides where to move the file to (executing logrotate should work too) and use one of these: