Questions tagged [inotify]

57 questions
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,234
  • 8
  • 21
3
votes
1 answer

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 simple…
Gajus
  • 851
  • 5
  • 16
  • 28
2
votes
3 answers

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 is keeping these beasts in sync ... (sync as in…
SvennD
  • 749
  • 5
  • 18
2
votes
1 answer

How to watch for arrivng files if inotifywait unavailable?

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 (like "jpg"), move the file to some other…
user1011471
  • 179
  • 1
  • 8
2
votes
3 answers

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 process. #! /bin/sh case "$1" in start) …
2
votes
0 answers

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,create,delete /var/www/htdocs /administrator…
Biffy
  • 121
  • 2
2
votes
1 answer

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="/home/myuser/newldif/" while inotifywait -e…
rahuL
  • 692
  • 3
  • 12
  • 31
2
votes
2 answers

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 inodes are sockets isn't something that inotify is…
atx
  • 1,281
  • 1
  • 9
  • 26
2
votes
2 answers

Code promotion plan from dev to live for wordpress

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 dev to live fast and secure. I was thinking…
Toqeer
  • 1,241
  • 3
  • 14
  • 20
2
votes
2 answers

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/magento/media/tmp/catalog/product" echo "Watching…
Christian
  • 796
  • 3
  • 13
  • 31
2
votes
1 answer

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?
clneagu
  • 43
  • 1
  • 5
2
votes
4 answers

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 / added my some other means (like a cat, made…
Alexander Gladysh
  • 2,423
  • 8
  • 31
  • 49
1
vote
1 answer

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/BINLOGS/ in my sys.log I I can see in my syslog…
BostonAreaHuman
  • 141
  • 1
  • 5
1
vote
2 answers

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 moves those files into another folder using rsync.…
PoTTii
  • 21
  • 1
  • 4
1
vote
2 answers

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 do something such as chattr +i $filename after a…
RaWkStAr
  • 33
  • 8