qarmin / czkawka

Multi functional app to find duplicates, empty folders, similar images etc.
Other
19.64k stars 642 forks source link

Unix command line support #258

Open blob79 opened 3 years ago

blob79 commented 3 years ago

It would be nice to use czkawka like any other unix tool. For example, if you check a 1TB drive it make sense to filter candidates with a cheap first round and then do full checking on the candidates in the second round.

czkawka_cli dup -s HASHMB -d ~ | czkawka_cli dup -s HASH

For this to work the following changes are necessary:

  1. Reading the -d from stdin (supporting whitespace paths like xargs -0)
  2. Writing candidates to stdout (find --print0-like to support whitespace in paths)
  3. Write user visible output to stderr

Once this is implemented the user can use czkawka like any other unix tool with grep/cut/etc.

blob79 commented 8 months ago

The same applies to czkawka_cli image and czkawka_cli video. It would be helpful to be able to read the file list from stdin to allow:

find | czkawka_cli image

Tools like find provide more fine grained control.