Questions tagged [inotify-tools]
17 questions
12
votes
3 answers
Cannot install inotify on Amazon EC2
I have an AWS EC2 instance and wants to install inotify-tools. I've added the repository by executing the command: rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm then execute yum install inotify-tools but…

marvinv
- 181
- 2
- 9
7
votes
3 answers
how to achieve linux's inotify-tools shell methods on osx
To monitor a file in linux, I can use inotify-tools like this
#!/bin/bash
# with inotify-tools installed, watch for modification of file passed as first param
while inotifywait -e modify $1; do
# do something here
done
but how would I…

Billy Moon
- 57,113
- 24
- 136
- 237
6
votes
2 answers
Make inotifywait group multiple file updates into one?
I have a folder with Sphinx docs that I watch with inotifywait (from inotify-tools). The script re-builds the html & singlehtml and refreshes Chrome.
#!/bin/sh
inotifywait -mr source --exclude _build -e close_write -e create -e delete -e move |…

culebrón
- 34,265
- 20
- 72
- 110
5
votes
1 answer
inotifywait To run command based on type of file modified
I'm specifically trying to simultaneously watch 2 different filetypes in 2 subdirectories:
.coffee filetypes in the 'js' subdirectory
.styl filetypes in the 'css' subdirectory
I only know so much bash and I'm trying to get something like this to…

Marius Miliunas
- 1,023
- 18
- 34
3
votes
2 answers
Gaining better performance with inotify-tools and unison.
I use inotify-tools and unison to synchronize folders between machines.
Because I have a large folder to synchronize, I just simply write an inotifywait script to do the job automatically.
Is it sensible to let inotifywait to monitor the…

ice6
- 1,173
- 9
- 9
3
votes
2 answers
Processing data with inotify-tools as a daemon
I have a bash script that processes some data using inotify-tools to know when certain events took place on the filesystem. It works fine if run in the bash console, but when I try to run it as a daemon it fails. I think the reason is the fact that…

Rad'Val
- 8,895
- 9
- 62
- 92
2
votes
2 answers
How can I use inotify-tools to have an email sent to me when a file in a directory has been added?
Users sometimes add files to a directory on a linux server. I was looking at ways to be informed when a file has been added to this directory. I found inotify-tools:
https://github.com/rvoicilas/inotify-tools/wiki/
But I am not too sure how to go…

HyderA
- 20,651
- 42
- 112
- 180
2
votes
1 answer
inotifywait not reacting to file creation by apache
I have a script which is supposed to copy photos uploaded by admin users to our website to two other backend servers. To do so it does the following:
while true; do …

Tom Macdonald
- 6,433
- 7
- 39
- 59
1
vote
2 answers
inotifytools bugs
I'm using inotifytools to monitor a directory recursively. when I use the following command
inotifywait ./test -m
after the command, if I create a director under ./test, assuming ./test/test2. Then if I do something under test2, for example,…

Edison
- 109
- 3
- 9
1
vote
1 answer
inotifywait not piping output to console
I have the following shell script running a inotifywait command. I want to print the output echo to the console upon every modify event.
The script:
#!/bin/sh
while inotifywait -e modify -r -m ./ --exclude '\.sh$'; do
echo test
done
When I change…

Mike Hawkins
- 2,144
- 5
- 24
- 42
1
vote
1 answer
How to detect that ftp upload is finished on a Linux server?
I'm using inotify-tools on CentOS 7 to execute a php script on every ftp upload.
It's working fine, but there is one problem; when the upload gets aborted (for example if I stop uploading or close FTP client) then it still triggers the script.
Is…

HTMHell
- 5,761
- 5
- 37
- 79
1
vote
1 answer
inotify script runs twice?
I'm using inotify-tools (inotifywait) on CentOS 7 to execute a php script on every file creation.
When I run the following script:
#!/bin/sh
MONITORDIR="/path/to/some/dir"
inotifywait -m -r -e create --format '%w%f' "${MONITORDIR}" | while read…

HTMHell
- 5,761
- 5
- 37
- 79
0
votes
1 answer
Remote Path for monitoring changes
I`ve created simple script which is based on inotify-tools, but finally after when i decided to monitor /remotepath, which was mounted from NAS by command mount.cifs, it wasnt work.
So after some investigation i found information, that inotify-tools…

itnoob
- 13
- 7
0
votes
1 answer
Queuing events with inotifywait
Initialize source and destination directories.
srcdir=/user/user1/src
tagtdir=/user/user1/dest
I would like to get notified when a file is copied over into the srcdir and -m for continuous monitoring.
inotifywait -m -r -e close "$srcdir" |
while…

user3803714
- 5,269
- 10
- 42
- 61
0
votes
2 answers
Inotifywait not working when using inside bash script
I am trying to make a bash script with inotiy-tools that will monitor a directory.
Here is my script
while f=$(inotifywait -m -e create -q -r "/media/data2/Music/English" --format '%f %w')
do
echo "$f"
done
The problem is when I run the above…

RanRag
- 48,359
- 38
- 114
- 167