iemejia / catho

A file catalog utility inspired by the awesome Robert Vasicek's Cathy project. Or my excuse to hack something that I really need.
GNU Lesser General Public License v3.0
6 stars 1 forks source link

Add fdupes command #30

Open iemejia opened 11 years ago

iemejia commented 11 years ago

Based on the idea of: https://github.com/seabre/finddupes/blob/master/finddupes.sh SELECT hash, location FROM files WHERE hash NOT IN (SELECT hash FROM files GROUP BY hash HAVING ( COUNT(hash) = 1 )

iemejia commented 11 years ago

or fdupes https://code.google.com/p/fdupes/

iemejia commented 11 years ago

what to do with hardlinks ? --gen-rm-script catalog: to generete a script to remove the dupes in the specific catalog

iemejia commented 11 years ago

The query is: SELECT hash, path, name FROM catalog WHERE hash NOT IN (SELECT hash FROM catalog GROUP BY hash HAVING ( COUNT(hash) = 1 )) order by hash;