Questions tagged [inotify]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
52 views

How can I monitor deletion of /dev/null

Usually I use inotfiy_add_watch to monitor deletion of files, it works for regular files or even most device files(/dev/zero,etc...), but fails for /dev/null. It seems that any operations to it will ...
user avatar
0 votes
2 answers
92 views

Trigger a command when two files have arrived in different directories in Centos 7

I need to launch a command when two files from different sources are present. Every file could arrive in different time, but I want to trigger the command when both were received. I have tried to do ...
user avatar
0 votes
1 answer
195 views

inotifywait script causes recursive loop

I have an inotifywait script that monitors a ftp upload directory and whenever a new file is uploaded it sets the correct permissions. I do this because the remote client forces wrong file modes and ...
user avatar
  • 3
1 vote
1 answer
131 views

incrond is firing my rclone but the rclone is not working... but from the command line the rclone command works fine

So in my incrond I have the following: /home/mounts/localdisk/LINUXBACKUP/binlog/ IN_ATTRIB,IN_CREATE,IN_CLOSE_WRITE rclone sync /home/mounts/localdisk/LINUXBACKUP/binlog/ GoogleDLinux:LINUXBACKUP/...
user avatar
11 votes
4 answers
10k views

Execute command when a file changes

I have a scenario where I am uploading .csv files to a specific folder, /tmp/data_upload, every day, and the old files are replaced by the new one. I need to run a Python script once the data is ...
user avatar
  • 172
0 votes
0 answers
96 views

Alert when a daemon stops writing in log file after some seconds

I need to send an alert if one daemon (linux) stops writing in his log file. This dameon not work properly and it not write any when shutdown. I am using an inotify for watch this problem. I see ...
user avatar
  • 397
2 votes
1 answer
1k views

Inotify does not work on EFS (remote filesystem)

I tried to use inotify notifications, to check for filesystem events, but it does not work. no file-system vent notifier worked. Is there any inotify utility available for remote file system like EFS,...
user avatar
  • 4,200
0 votes
1 answer
968 views

How to reload httpd service on changes automatically using Supervisord?

I am working in a Docker container that so far have the following ready to go: CentOS 6 (latest, I think is 6.9) Apache 2.2.15 (latest on CentOS6 repositories) PHP 5.3.3 (latest on CentOS6 ...
user avatar
  • 690
2 votes
3 answers
300 views

rsync two large storage servers

We have two large storage servers (+100TB), one runs on ZFS the other one runs XFS, we intent to use the XFS as our work server and use the ZFS as the backup server (snapshots <3). Now the problem ...
user avatar
  • 739
1 vote
2 answers
2k views

Inotify & Rsync - Don't move files before download is completed

I am using a local website which downloads files to my server. Using an Inotify daemon I'm listening for file changes in a specific folder (the one I am downloading to) and executing a script which ...
user avatar
  • 21
0 votes
2 answers
1k views

Inotify/iwatch cannot see when more files created at the same time

I would need a script that can check files when they are getting uploaded/created on the server. I wrote the script that checks, but I would like to make it run when a create event happens. I tried ...
user avatar
  • 31
2 votes
1 answer
3k views

How to watch for arrivng files if inotifywait unavailable? [closed]

I have a directory that gets written to when other machines send files via FTP. I want to put something in place that notices when files arrive and if their file name contains a particular substring (...
user avatar
2 votes
3 answers
3k views

Bash script as daemon on debian

i have a short script in bash, which need to run as daemon on background. It's based on inotifywait, which should wait for changes on specified folder and in case of any changes it should runs copy ...
user avatar
1 vote
2 answers
2k views

Deny deletion after SFTP upload

I'd like to prevent users from deleting files they have uploaded to my sftp server. I know I could set up a solution of my own using inotify/dnotify (or pam hook) and lsof which triggers a script to ...
user avatar
0 votes
0 answers
153 views

prevent proftpd to rename directoy on create

description: I asked a question in stackoverflow (Link to question) about how FTP server works in data channel, I did not get my answer,however I find out that there are several FTP server, My server ...
user avatar
7 votes
1 answer
9k views

How do "correctly" sync millions of files with rsync and inotify?

Assume I have 1 million files, the file list would be something like 20MB. If I add just one file, inotify will tell rsync to transfer the file list and the new file. My network is not good and I ...
user avatar
  • 519
0 votes
1 answer
448 views

inotifywait invalid option -d (daemon) [closed]

I'm trying to run inotifywait as daemon by this command: root@server:/# inotifywait -mrd -e delete -e delete_self -e create -e moved_from -e moved_to /path -o /tmp/path.log But I'm getting this ...
user avatar
  • 111
2 votes
0 answers
2k views

Running inotifywait on startup of machine

I want to start this inotifywait script on startup of the machine, in order to monitor the folders from the moment of booting: #!/bin/bash while inotifywait -r -e modify,attrib,close_write,move,...
user avatar
  • 121
1 vote
1 answer
136 views

Why inotify-tools has different log format with the same config?

inotify config: /usr/bin/inotifywait -e modify \ -mrq --timefmt %a-%b-%d-%T --format '%w%f %T' \ /var/www/ | while read file; do echo "$file " >> /var/log/inotify.log ======================...
user avatar
  • 1,353
-1 votes
2 answers
352 views

How to monitor and list modified files server wide for brief periods of time?

I would like to, from time to time, enable server-wide file monitoring that will show me all files being modified, updated and created while I have it running and thus simply spewing forth a list of ...
user avatar
  • 1,001
1 vote
2 answers
2k views

Use inotifywait and lftp to synchronize servers

I have two servers: Server A (CentOS), where people can upload files to (upload root is /files) Server B (Win 2008), with FileZilla FTP Server (FTP root is C:\content) I want that whenever a file ...
user avatar
  • 134
6 votes
3 answers
10k views

Permission denied for root to change inotify max_user_watches, how solve this?

As root in a CentOs 6.4 server I got this error in an application: Fri May 16 01:45:23 2014 Error: Terminating since out of inotify watches. Consider increasing /proc/sys/fs/inotify/max_user_watches ...
user avatar
1 vote
1 answer
623 views

Is there a good way to combine the incremental behavior of rdiff-backup with the inotify behavior of lsyncd?

I'm trying to backup a directory (my Zotero data, in particular) whenever it changes (a la syncing with drop box); I would also like to keep a history of backups in case I delete something and want to ...
user avatar
  • 121
0 votes
3 answers
2k views

inotify and rsync on large number of files

I am using inotify to watch a directory and sync files between servers using rsync. Syncing works perfectly, and memory usage is mostly not an issue. However, recently a large number of files were ...
user avatar
3 votes
2 answers
764 views

monitor a directory with a shell script

I'm looking for shell command like the kernel's inotify function. Is there a command that will monitor a directory, that could be used like this: while [ 1 ]; do name-of-monitor-program . &&...
user avatar
  • 439
1 vote
1 answer
2k views

nohup create multiple process

I am using nohup for the script run inotify command, because inotify stop when I exit from terminal so I want the script to run on background. so I run the script like this nohup /path/to/script.sh &...
user avatar
  • 13
0 votes
1 answer
607 views

Tomcat error checker using bash

Can someone shed me some light, point me in the right direction? I want to create a script in bash that will checks exceptions in the logs during the startup of Tomcat app. This script should be able ...
user avatar
2 votes
1 answer
813 views

inotify in bash script doesn't work with ldapadd command

I have written a bash script which detects if a .ldif file has been written into a directory and if written, executes an ldapadd command and then deletes that file. The scripts is as follows: dir="/...
user avatar
  • 688
0 votes
2 answers
5k views

Run inotifywait in background

I tried literally ALL ways to get this script running in the background (as startup script, as daemon, etc.). The problem is that this script works in the terminal, but not in the background: #!/...
user avatar
2 votes
2 answers
2k views

Identify when a TCP socket is opened with inotify

As the title suggests, is there a way of being notified of recently opened sockets using inotify/inotify-tools? As far as I can tell inotify only works with inodes and specifically testing if those ...
user avatar
  • 1,281
0 votes
1 answer
894 views

I want to save events or logs grabbed using Inotify to a file

I need your help - using Inotify I am watching a directory for the changes like create, delete, rename and move. I want these event to be logged in a file and I want to run Inotify as a service.
user avatar
0 votes
1 answer
1k views

How to check which processes are deleting files without using inotify or auditd? [closed]

I'm trying to figure out which processes are deleting files from a specific directory on my CentOS server. I looked at inotify, but all this does is to tell me how many file deletions are occurring; ...
user avatar
2 votes
2 answers
94 views

Code promotion plan from dev to live for wordpress [closed]

We are having wordpress multi-site and the developers do there development on dev server, We are not using any version control for wordpress development, I need some plan so we can move the site from ...
user avatar
  • 1,201
0 votes
2 answers
701 views

Monitor file changes showing file contents changed

My question is similar to Find out which process is changing a file , but i need something more. inotify only tells about few events on a file, Auditd also just gives us pid which did something to ...
user avatar
  • 4,200
5 votes
1 answer
11k views

inotifywait usage and exclude

I want to monitor special path to any event of create or modified files recursively in it via inotifywait but I don't know what's my problem is. I have some folders that I want to exclude. watchpath ...
user avatar
  • 451
0 votes
1 answer
349 views

synchronization between two (or more) file servers : block open files to avoid conflicts

"Short version": When a user opens a file on a local share, other users can open only in read-only, until it is closed. I want this to be true for the remote copy of the file: read-only when the local ...
user avatar
2 votes
2 answers
1k views

inotifywait not reacting

I have a very simple script to log when new files are created, in fact, for test purposes I told it to watch for any event. #!/bin/sh WATCHED_DIR="/var/www/html/...
user avatar
  • 746
3 votes
1 answer
3k views

Setting up inotify (incron) to monitor several directories using asterisk

I am trying to create an entry in /etc/incron.d/ that'd monitor all changes done under the following directories: /var/www/virtualhosts/dev.anuary.com/*/*/public/css Now, I assume this should be as ...
user avatar
  • 831
0 votes
1 answer
215 views

inotify support not available

Im getting a tailwatch error that I think I have traced down to this from my error logs inotify support not available (Linux::Inotify2 missing or non-functional) Have no idea what this is or how to ...
user avatar
2 votes
1 answer
2k views

How can I exclude PATTERN from inotify/incron

I'm using incron to watch for events in a directory but I want to exclude some subdirectory or some filename PATTERNS. Is there a way I can do this elegantly?
user avatar
  • 43
2 votes
4 answers
945 views

Cross-server file mirroring with minimal latency

Platform: Ubuntu 10.04 x86. We have a HTTP server (nginx, but that is not relevant) which serves some static content. Content is (rarely) uploaded by content-managers via SFTP, but may be changed / ...
user avatar
1 vote
1 answer
600 views

how to make pyinotify to run a program on any modification over a file?

I have to watch for any input given to or any changes that made in the present content over a file, upon any modification i need to run a python program which is located in the same folder. I tried ...
user avatar
4 votes
2 answers
2k views

Automatic file revision on upload

I need to create a secure remote connection to a couple of files (SFTP, WebDAV/HTTPS,…). Users need to connect and edit those files by downloading->editing->uploading-replacing or, even better, by ...
user avatar
  • 331
4 votes
5 answers
691 views

Event triggered backup systems -- what are my options?

Background - I work in a corporate environment where files on network shares are constantly being modified. Created, deleted, overwritten. Of course with hundreds of users, you can imagine the odd ...
user avatar
  • 41
1 vote
1 answer
430 views

Can I patch a tiny part of the kernel without recompiling?

I'm using inotify for a project, and desperately require the functionality provided by this patch: http://article.gmane.org/gmane.linux.kernel/758183 Can I apply this patch to my existing Linux ...
user avatar
0 votes
2 answers
2k views

inotify or similar on centos

I need to get alerted when a new directory or sub directory is created within the root directory that I am monitoring. The alert has to be triggered to a PHP file. How do I do this on CentOS? Is ...
user avatar
  • 292
1 vote
1 answer
3k views

Question About inotifywait

Here is an example shell script I'm looking at implementing using inotify: inotifywait -mrq -e close_write -e create -e delete -e move /var/www | while read file; do rsync -av /var/www1/ /var/...
user avatar
5 votes
3 answers
4k views

lsync, unison or some other inotify auto-syncing tool..?

I have an app farm which generates thumbnails and makes them available to a web server farm using nfs. However the performance is so poor so I am going to make a local copy of the files on each web ...
user avatar
  • 10.9k
7 votes
4 answers
3k views

Automatically run a command every time a file is changed

Each time I make some changes to a file and save, I'd like a command to run. I can set up a Ruby script that could monitor the file and run the command as I'd like, but it occurs to me that there ...
user avatar
  • 427
5 votes
5 answers
9k views

How to find out what files an installer (rpm, deb) created?

I need to find out all the file system modifications an installer did. Most likely the installed package is an rpm or deb, but an app could of course be simply copied over or compiled and installed ...
user avatar