Skip to content

BDeliers/File-Watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

File-Watcher

Simple file watcher which executes a script each time this file is modified. The previous instance of the script is killed.

When you call the script, you specify the path of the file to watch. Each time it's modified on the disk, the specified script is started and the provious instance is killed

By BDeliers, June 2018


Compile the file (I used GCC) and you're ready !

CALL SAMPLE :

file-watcher /home/myname/somewhere/somefile /home/myname/somewhere/someExecutableFile /path/to/executer commandToExecute

REAL EXAMPLE WITH PYTHON SCRIPT :

file-watcher /home/server/myDataBase /home/server/myscript.py /usr/bin/python3 python3

REAL EXAMPLE WITH BASH SCRIPT :

file-watcher /home/server/myDataBase /home/server/myscript.sh /bin/sh sh
Uses 0% ram and 0% cpu for me

How it looks :
Call Example

Computer's resources usage :
Resource Example

About

Simple file watcher which executes a script each time this file is modified. The previous instance of the script is killed.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages