0

In Centos 7 I am tracking a folder on the Samba Server with incrontab. I want to copy this folder to another folder when it is created.

Before writing to the Samba server I first define the file path, the software copies it directly to the incrontab that it creates in the folder I specify. This leads to empty data.

I wait for the analysis software to finish and expect to copy the file afterwards.

public_html
  • 309
  • 1
  • 4
  • 10
  • You are right to look at `inotifywait`. That is what you can use to monitor for a change in the directory PARENT directory for the directory that will be created. On the inotify event, you can test whether the directory contains files or not before invoking your copy to somewhere else. Search `inotifywait` on this site -- there are many examples on how to properly use it. I've never heard of `incrontab`, (unless that is the name of your directory). – David C. Rankin Aug 03 '18 at 20:46
  • Since Stack Overflow hides the Close reason from you: *Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve).* – jww Aug 04 '18 at 05:22

0 Answers0