diff options
-rw-r--r-- | README.markdown | 13 | ||||
-rwxr-xr-x | checkem | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown index 1e7c8bc..a44e70d 100644 --- a/README.markdown +++ b/README.markdown @@ -27,6 +27,19 @@ There's a (presently) very basic test suite: Q&A --- +### Can I compare sets of files rather than sets of directories? + +Sure. This uses `File::Find` under the hood, which like classic UNIX `find(1)` +will still apply tests and actions to its initial arguments even if they're not +directories. This means you could do something like this to just look for +duplicate `.iso` files, provided you don't have more than `ARG_MAX`: + + $ checkem ~/media/*.iso + +Or even this, for a `find(1)` that supports the `+` terminator (POSIX): + + $ find ~/media -type f -name \*.iso -exec checkem {} + + ### Why is this faster than just hashing every file? It checks the size of each file first, and only ends up hashing them if they're @@ -29,7 +29,7 @@ our $VERSION = 2.9; # If no arguments, work with the current working directory if ( !@ARGV ) { - printf {*STDERR} "%s\n", 'Need at least one dir to search'; + printf {*STDERR} "%s\n", 'Need at least one file or directory'; exit 2; } |