diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-08-10 15:24:35 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-08-10 15:27:46 +1200 |
commit | 7ab10c6bbbeeebb9c1fae832e9466b2f1df2f7a1 (patch) | |
tree | 197fdb9618eb4471937ac52cd4f0b7d0cf464a05 /README.markdown | |
parent | Merge obvious two blocks (diff) | |
download | checkem-7ab10c6bbbeeebb9c1fae832e9466b2f1df2f7a1.tar.gz checkem-7ab10c6bbbeeebb9c1fae832e9466b2f1df2f7a1.zip |
Explain support for searching for duped files
We get this for free from File::Find
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 13 |
1 files changed, 13 insertions, 0 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 |