Skip to content

Commit

Permalink
documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ColumPaget committed Jan 4, 2016
1 parent edc4604 commit 3ce2ac0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Options:
-n <length> Truncate hashes to <length> bytes
-c CHECK hashes against list from file (or stdin)
-cf CHECK hashes but only show failures
-C CHECK files against list from file (or stdin) can spot new files
-Cf CHECK files but only show failures
-m MATCH files from a list read from stdin.
-lm Read hashes from stdin, upload them to a memcached server (requires the -memcached option).
-X In CHECK or MATCH mode only examine executable files.
Expand Down Expand Up @@ -249,6 +251,8 @@ USES FOR HASHRAT

the -c forms only check the files listed on stdin. The -C forms read a list of files on stdin, but they expect to be given a directory to check, and they check every file in that directory, outputing any that weren't in the list, or that are in the list but not on disk, as well as any that have changed. Thus the -C forms allow one to detect new files, changed files, and deleted files, where the -c form only detects changed and deleted files. The -c and -C forms both work as -C if the hashes are supplied via memcached or file system attributes (using -xattr or -memcached)

Note that -C implies -r, so you don't need to supply -r


3) Finding files that match hashes.

Expand Down
8 changes: 5 additions & 3 deletions hashrat.1
Original file line number Diff line number Diff line change
Expand Up @@ -454,14 +454,16 @@ Similarly these can then be used \fIto\fP check files later:
.PP
.nf
.fam C
$ cat /tmp/files.sha256 | hashrat \-sha256
$ cat /tmp/files.sha256 | hashrat -c \-sha256

$ hashrat \-c \-sha256 \-r . \-xattr
$ hashrat \-C . \-sha256 \-xattr

$ hashrat \-c \-sha256 \-r . \-memcached
$ hashrat \-C /tmp \-sha256 \-memcached

.fam T
.fi
Note that -c checks only check the files in the supplied list. The -C flag instead checks all files in a directory (supplied on command line) and expects to find those in the list. This means that -C can find new files that aren't in the list, whereas -c can't.
.fi
There is a slight difference between xattr/memcached checks and checks where a list is read from stdin. Currently when reading from stdin \fBhashrat\fP will ONLY check the
files in the list. However, in \fB-xattr\fP and \fB-memcached\fP mode, it will check all files, outputting and error for those where no stored \fIhash\fP can be found. This is likely
\fIto\fP change in the a future release, with the stdin method being brought into line with the others.
Expand Down

0 comments on commit 3ce2ac0

Please sign in to comment.