Does inotifywait on Linux allow collection of events over a timeout period?

cf. FSEvents on OSX, which by default collects FS events over 1 second (timeout configurable) before firing off the event. This has the benefit of collecting a series of filesystem changes into a...

How to run fswatch to call a program with static arguments?

I used to use fswatch v0.0.2 like so (in this instance to run django test suit when a file changed) $>fswatch . 'python manage.py test' this works fine. I wanted to exclude some files that were...

Watch for file changes and add changes to github?

On OSX I want to create a script that 'when a file changes, automatically runs git add [FILES CHANGED]; git commit -m "Changing ${file names}"; git push -u origin master" I understand there is...

Making a watched folder wait for a file to finish rendering

I'm trying to setup a watched folder (using fswatch)that starts to convert a received file into another format using ffmpeg(got that part sorted out). So far so good, what I'm having problems with...

I want to watch multiple folders with fswatch on Mac

I see in the documents for fswatch it has $ fswatch -0 [opts] [paths] | xargs -0 -n 1 -I {} [command] but I don't really understand how I'm supposed to add multiple paths to that - I'm watching...

How to use fswatch and rsync to automatically sync directories?

I'd like to automatically run a one way sync between two local directories using rsync. Meaning when a change is detected in a file of /dir1 or its subdirs, the following command should run: rsync...

fswatch to watch only a certain file extension

I am using fswatch and only want it triggered if a file with extension .xxx is modified/created etc. The documentation and the second reference below indicate that: All paths are accepted by...

Pipe fswatch output into a shell script

I am trying to pipe the output of fswatch to several commands in a shell script with following technique: $ fswatch -0 [opts] [paths] | xargs -0 -n 1 -I {} [command] Instead of [command] I put...

fswatch with grep not piping

I want to use fswatch to run a file through my unit test framework whenever I save. As a test, I run fswatch and make a minor change to /my/path/test.txt in my text editor and get the output I...

Accepting name of changed file in fswatch with xargs in osx

In osx I am trying to detect when a new file is added to a folder, then execute a script to process that new file. Seems simple, right? I am doing this: fswatch -0 ~/motion-detection | xargs -0...

rsync, directory containing 3 million files, can it keep up?

I am working on a mac computer using bash commands via terminal. I am running a DNA sequencer that generates ~3-5 million files over the course of 48 hours. For speed reasons these files are saved...

Shell: How do I make sure only one command duplicate will be executed after the current one

I am watching my project dir for the file change and running sync script whenever files change. Certainly I do not want to run the second synchronization before the first one is done. flock...

NodeJs fs.watch/FSWatcher Error

Hello I Use the following, Ubuntu 17.04 Node: v6.11.2 NPM: v3.10.10 While installing My project dependencies I get warning on installing fsevents(this error. I ignored that and I ran the project...

How to insert variable in fswatch regex?

I'm trying to use a variable to identify mxf or mov file extensions. The following works where I explicitly name the file extensions with a regular expression. ${FSWATCH_PATH} -0 \ -e ".*"...

Sending response after file changes

I want to execute a commande in *matlab* using *shelljs* and after it finish send response to client : var cmd = 'matlab -nojvm -nosplash -nodesktop -noFigureWindows -minimize -r \" senario();...

Bash Script - fswatch trigger bash function

I have a bash script where I want to trigger a method every time the filesystem is changed: #!/bin/bash function run { echo Do some magic // Do some magic } run fswatch . src |...

fswatch error when trying to run react in a windows docker container

I'm running a unbuntu:latest docker container using Docker Toolbox on win10. I use create-react-app npm to automatically create a react app for me. when I run "npm start" I get the following...

Bash: run command on file change and on standard input

I have a nice file watcher using fswatch: cmd="go install ./..." $cmd fswatch -0 ./ | while read -d "" event; do echo "File Changed: $event" $cmd done Now I also want to listen for input at...

Moving bazel-bin symlink somewhere else?

Is there a non-painful way to have bazel-bin symlink moved to some other location and still be able to do bazel test commands as usual? The philosophical problem is that having reponame/bazel-bin...

How to properly setup docker-sync to exclude folders

I am trying to setup docker-sync to exclude my app/cache and app/logs folder but it is not working. Things I've tried: Using sync_excludes: ['.idea', 'app/cache/', 'app/logs/'] but it will be...

Bash script called from native osx app produces the error "Operation not permitted"

#What I'm Trying to do# Call a bash script from my native osx app that syncs a local directory on my mac to a remote server. The bash script uses the following libraries: fswatch rsync The Error...

port exclude pattern from inotifywait to fswatch

So I have this regex exclude pattern which works excellent with inotifywait on Linux: .*\.\w+\.\w{6} Now I want to port it to fswatch on macos and use with -e or -Ee flag. What have I tried so far...

Is there a way to watch a .git folder, and update my git log whenever it changes?

I have been trying to create an automatically updating git log --graph --no-pager. I made some strides using fswatch but I ran into the issue of my git history being actually bigger than my screen...

Changing the permissions and owner of the /var/www/html folder using fswatch and xargs

I want to change the owner and permission of the /var/www/html folder every time I add/create or update any new file or directory in this folder. I thought of using fswatch for this to grab the...

Cannot find file when using fswatch and rsync to automatically sync directories

I am using fswatch and rsync to automatically sync directories between Mac and ubuntu servers. The shell is like /Users/david/Documents/code/shell/fswatch_rsync.sh: #!/bin/bash sudo fswatch -o...

How to track order of newly created files in directory with fswatch

I need to monitor a downloads directory, and keep track of the order in which files were written to the directory. The only way I know this is possible in macos is fswatch, but the documentation...

'flutter test' running on docker image causing testfile.dill.track.dill change and then causing test failure on CI environment

I'm having unit test erros running flutter test in a gitlab-ci environment. Below is a complete list of things I've already done trying to solve the issue, but haven't found a solution so far....

"rpmbuild -bb package.spec" configure: error: *** A compiler with support for C++11 language features is required

When I build the spec file with rpmbuild -bb package.spec, I get this error about needing support for C++ 11 configure: error: *** A compiler with support for C++11 language features is...

launchd - how to keep script running in the background

I have a simple script to upload the file to dropbox whenever it changes. I wanted to run it at system startup and keep it in a background to let the script watch the file. I've created a plist,...

ZSH: Output from stdout from within while read gets lost

I ran into a weird ZSH issue. I have trimmed the script to the smallest form that still reproduces the issue. What I'm simulating here, is monitoring a directory for changes via a subprocess (the...