eirtscience / inotify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool



Fnotify


Fnotify is similar to the linux notify program where it watch directory for change. Beside watching directory for changed, Inotify execute a set of specify action using the action option.



Requirement


  • Environment

    • Operating System : GNU/Linux Ubuntu 18.04
  • Software packages

    Packages Version
    python 3.5+



How it works


fnotify allows you to describe an action to execute whenener a given directory contain has been changed. When running fnotify for the first time



Installation Guide


  • Install using pip

    Download the installation script following the below command.

    ~$ pip install fnotify

    Now go ahead and run the below command and wait.

    ~$ fnotify --help

Fnotify command line


The below table describe the information needed by fnotify to work.

Option Description Default
dir The directory to watch
action Action to perform when the contain of the directory changed


  • Watch directory folder with fnotify

    Let us run fnotify on a module folder called module_folder

    $> fnotify --dir module_folder --action="ls -la"

    The above command tell fnotify to watch the "module_folder" directory, whenever any file has been changed in that directory and rerun the ls -la shell command.

About


Languages

Language:Python 100.0%