Questions tagged [inotify]

57 questions
17
votes
7 answers

Is there a working Linux backup solution that uses inotify?

It takes forever to back up. Before we can trust btrfs or ZFS to backup incremental snapshots, wouldn't it be nice if there was a daemon that used inotify to keep track of which files had actually changed so backups would run more quickly? Where is…
joeforker
  • 2,349
  • 4
  • 25
  • 34
17
votes
5 answers

How to automatically run a script when the contents of a directory changes in Linux?

I want to automatically run a script whenever new files are copied into a particular directory. In other words, is there a way in Linux to "watch" a directory for changes and then run something in response to the change?
GeneQ
  • 407
  • 2
  • 8
  • 17
11
votes
4 answers

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 uploaded. For this, I have an idea to create a cron…
Alex
  • 172
  • 1
  • 1
  • 8
7
votes
1 answer

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 might have to limit the bandwidth…
seanlook
  • 529
  • 2
  • 9
  • 18
7
votes
4 answers

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 should be some simple Unix way to do this. Is there?…
ehsanul
  • 427
  • 1
  • 8
  • 19
6
votes
3 answers

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 But when I try to run the command as root I got…
Samuel G. P.
  • 399
  • 2
  • 3
  • 10
5
votes
5 answers

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 with the configure;make;make install way. Even…
Auditor Newbie
5
votes
1 answer

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 -> folder1 -> file1 ->…
sweb
  • 451
  • 1
  • 9
  • 27
5
votes
3 answers

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 node. I looked at unison and lsync, but there…
Tom
  • 10,886
  • 5
  • 39
  • 62
5
votes
2 answers

How do I get inotify-like event notifications from an NFS server?

AFAIK, the Linux implementation of NFS doesn't support inotify-like event notification from the server-side -- is there a workaround, patch, or alternative solution that can produce the same data?
cdleary
  • 1,635
  • 4
  • 17
  • 11
4
votes
2 answers

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 editing them in place (if WebDAV). The server (Linux…
Gabriele
  • 331
  • 1
  • 4
  • 13
4
votes
5 answers

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 time where people accidentally delete the wrong…
Mark C
  • 41
  • 1
3
votes
3 answers

Monitoring what files are changed

Is there a way in linux (possibly using Inotify?) to "log" what files are edited, live?
3
votes
2 answers

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 . && echo "something changed" done
Joel
  • 439
  • 2
  • 5
  • 11
3
votes
1 answer

How do you know your current number of inotify parameters (queued_events, user_watches, user_intances) in Linux?

I know how to get/set max values for these parameters with /proc/sys/fs/inotify/max_* files, but I want to know what is the current value...
sebthebert
  • 1,224
  • 8
  • 21
1
2 3 4