Skip to content

use "include" seems to break the watching file system  #199

@kevincaradant

Description

@kevincaradant

Hi
I really don't know how to manage with it ( inotifywait )

This is my current shell script

inotifywait -m -r -e create -e moved_to --include "^.*(txt|docx)$" --format '%w%f' "${MONITORDIR1}" | while read NEWFILE
do
           echo "FILE DETECTED: " + $NEWFILE
	   mv "$NEWFILE" "$DESTINATIONRENAMED"
           sleep 1
done

The issue I have it's when I create a folder 'toto' and a file 'titi.txt' into 'toto'.
To remember this 'toto' folder is created into "${MONITORDIR1}

I started the shell script (inotifywait) , added the folder 'toto' with the file 'titi.txt' into the watched path "${MONITORDIR1}"

The consequence: Nothing is watch / catch
I need to modify the name of the folder or the file which are into this current folder watched by inotify and then inotify see them

I don't know if I use something wrong with the tool ? I need to watch when titi.txt is here and do something after that

Thanks

NB: If I remove the include attribute, inotify see directly the new folder 'toto' ( but not the file inside it 'titi.txt' )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions