1

this problem is really driving me crazy.

My situation is that I'm having a big directory on my ubuntu server with about 150 subfolders I need to watch. Those subfolders mainly contain PDF files where users can upload new files on their own. Now as I need to make thumbnails of those PDFs and as I cannot access the source of the tool used to upload the files, I would like to check for newly added files (at best in real time) and if a new file is added I would like to use my script to automatically use ghostscript to create my thumbnails.

I already tried a solution with incron and another one with watcher (which didn't work at all, due to Ubuntu 10.04). Incron would have been great but doesn't work unfortunately as it can't be used for monitoring filesystems recursively...

I would be thankful for any help/hint

1 Answer 1

2

I think your solution is inotifywait:

-r, --recursive Watch all subdirectories of any directories passed as arguments. Watches will be set up recursively to an unlimited depth. Symbolic links are not traversed. Newly created subdirectories will also be watched.

4
  • And how is that related to incron ?
    – hek2mgl
    Mar 1, 2014 at 13:41
  • 1
    @hek2mgl I've answered to his question: "Watch Filesystem recursively and execute script when file is added in Ubuntu?". He wants a solution to watch his filesystem. He only wrote that incron doesn't support recursive watch. I said that inotifywait supports. So I don't understand your question.
    – uzsolt
    Mar 1, 2014 at 18:20
  • The question was imported from stackoverflow and edited during this. Originally it was more incron related. I was interested if it is really not possible with incron.
    – hek2mgl
    Mar 3, 2014 at 18:49
  • I don't use incron but as I see in google: incron doesn't support recursive watch. But I found this: github.com/nguyent/incron-recursive
    – uzsolt
    Mar 3, 2014 at 20:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .