A
A
accountnujen2021-09-25 12:39:13
linux
accountnujen, 2021-09-25 12:39:13

How to make incron see new folders?

Hello. I want to track the change of files (write) in a folder. I made this setting

/root/var/       IN_CLOSE_WRITE             curl "https://api.telegram.org/......."

And if you upload a file to the var folder, then curl will work, but if you create a new folder at the beginning and upload the file there, then nothing will happen. How can this be fixed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Priluzkiy, 2021-10-16
@Oxyd

incron, more precisely, inotify()it does not know how to recursively bypass directories. So you have to write the full path to the directory/root/var/yourfolder/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question