User Tools

Site Tools


inotify

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
inotify [2021/04/15 17:50] – created joseinotify [2021/04/21 09:18] (current) jose
Line 1: Line 1:
 +Para mirar eventos conectados con el kernel: inotify
 +
 Queremos recoger eventos en un directorio si se crean ficheros. Por ejemplo en la carpeta uploads de un webserver donde se suben fotos. Instalamos inotify Queremos recoger eventos en un directorio si se crean ficheros. Por ejemplo en la carpeta uploads de un webserver donde se suben fotos. Instalamos inotify
   apt-get install inotify-tools   apt-get install inotify-tools
Line 21: Line 23:
   /etc/incron.allow   /etc/incron.allow
  
 +He añadido esto para girar una foto
 +  /dades/web/htdocs/vino.lobo99.info/timelapse4/uploads IN_CLOSE_WRITE [[ ! $# == r_* ]] && [[ $# == *jpg ]] && convert /dades/web/htdocs/vino.lobo99.info/timelapse4/uploads/$# -rotate 90 /dades/web/htdocs/vino.lobo99.info/timelapse4/uploads/r_$# && mv /dades/web/htdocs/vino.lobo99.info/timelapse4/uploads/$# /dades/web/htdocs/vino.lobo99.info/timelapse4/uploads/originales
 +
 +
 +====== errores ======
 +Si nos da este error:
 +  Apr 21 11:14:45 docker incrond[55216]: cannot create watch for user root: (28) No space left on device
  
 +https://github.com/ar-/incron/issues/37
inotify.txt · Last modified: 2021/04/21 09:18 by jose