Skip to content

0xNaN/cwatch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cwatch

Build Status

A program to monitor the filesystem activity through the inotify Linux kernel library and executes a user defined command when specific events occurs. Useful for automatic backup system, alert monitor for directories and files, continuous testing and more.

This is a experimental release. At this stage we are testing the software as best as we can. If you would like to help us to test and improve this software, feel free to do everything you want.

Requirements:

sudo apt install check

A Quick-start:

  1. Clone the project:

      $git clone https://github.com/joebew42/cwatch.git
    
  2. Compile it:

      $cd cwatch/
    
      $autoreconf --install
    
      $./configure
    
      $make
    
  3. Run all tests:

      $make -s check
    
  4. Start use it:

    4.1. Read the manual

     ./src/cwatch --help
    

    4.2. Share with us your use case

Note: This README is just a draft. In the next days we will provide a new one well organized.

Practical Examples

Run tests every time a file changes in the src/ directory

./src/cwatch -c "make -s check" -d src/ -v -n

NOTE ⚠️ This generates a loop since make -s check will update the objects files (.o) inside the src/ folder.

Run tests every time a *.c or *.h changes in the src/ directory

./src/cwatch -c "make -s check" -d src/ -v -n -X '.*\.[ch]$'

About

A lightweight program that monitor activity of filesystem through inotify kernel library and triggers user defined commands.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 100.0%