Simple command line tool that indexes and analyzes changes of files and directories for a given root path. Written in Java.
On first use, compile the Java code by running
javac Sherlock.java
in terminal.
To just create an index file containing the absolute path and an md5 hash of each file in the directory located at <path>
, run the following command in the terminal:
java Sherlock -p <path>
Note: If -p <path>
is omitted, Sherlock will use the path of the directory it is located as the root path.
To detect files in the directory located at <path>
that have been modified, deleted or newly created since the index file was updated last, run the follwing command in terminal:
java Sherlock -a -p <path>
Note: If -p <path>
is omitted, Sherlock will use the path of the directory it is located as the root path.
Note: Before the analyze mode for a directory located at <path>
can be executed, there must exist an index.sk
file in this directory. To initially create this, simply run the index mode beforehand.
To specify certain files and diretories to be ignored by the index and analyze mode, create a file named ignore.sk
in the directory located at <path>
.
Lines not ending with / are treated as files. The file with the absolute path equal to this line will be ignored by Sherlock.
Lines ending with / are treated as directories. All the files and subdirectories in this directory will be ignored by Sherlock.
Lines that start with # are skipped by Sherlock (not treated as file or directory).
Simply add the option -v
as an argument at the end of any command to receive verbose output while the programm is executing.