Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
And how is that related to incron ? –  hek2mgl Mar 1 at 13:41
    
@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 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 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 at 20:21
    
Thank you ..... –  hek2mgl Mar 3 at 21:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.