Skip to content

ihexon/Watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Watcher

Watcher is a simple file status monitor service.

usage

WatchMe - A util use to monitor the changes of directory
usage:
watchme [OPTION] [DIRECTOR]
-r                      : recurse monitor, means the all directory and file will be monitor
-d [dir]                : the directory to monitor
-exchid                 : exclude the hidden directory
--log [file]            : log message to file
--help & -h             : show help
-ex [syntax:pattern]    : exclude path or file with pattern [syntax:pattern]

about -ex [syntax:pattern] command

A FileSystem implementation supports the "glob" and "regex" syntaxes, and may support others. The value of the syntax component is compared without regard to case. When the syntax is "glob" then the String representation of the path is matched using a limited pattern language that resembles regular expressions but with a simpler syntax. For example:

  • Whe syntax is glob:
[syntax:pattern]:

*.java
Matches a path that represents a file name ending in .java

*.*
Matches file names containing a dot

*.{java,class}
Matches file names ending with .java or .class

foo.?
Matches file names starting with foo. and a single character extension
/home/*/*
Matches /home/gus/data on UNIX platforms
/home/**
Matches /home/gus and /home/gus/data on UNIX platforms

  • when syntax is regex
regex:^.*/\\~[^/]*$

Should ignore scratch files

Deploy on Linux

ihexon@gentoo$ chmod +x watchme
ihexon@gentoo$ ./watchme -r -d `$DIR` --log /tmp/log -ex glob:**.exe

Other Platform

java -jar Watchme.jar -r -d $PATH --log /tmp/log -ex glob:**.exe

Please read project Wikis

Contribute

It just a TOY I guess

THE THINGS MUST TO KNOW:

  1. KEEP IT F**K SIMPLE,CLEAN,STUPID
  2. NO F**KING COMPLEX CODE PLEASE

Platform JDK >= 8

Recommend to Use Intellij IDEA Using jprofiler Java profiler

Contributer: IHEXON, FlyingMcDonald

About

A file monitor service writen in JAVA

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages