Consolidation program

Dave Smith dave at
Wed Oct 10 13:17:45 MDT 2007

Dave Smith wrote:
> I have a co-worker who has hundreds of duplicate large files strewn 
> about his Linux file system, and I want to help him consolidate them. 
> What I have in mind is a program that will find all files with a 
> certain extension, md5sum them all, and then create a master directory 
> with the files, and replace all the duplicates with symbolic links. 
> Does anyone know of such a utility?

I wrote my own little solution Qt/C++, called qduper. It's not a GUI 
app, just runs in the console, but uses things like QDir, QString, 
QFileInfo, and QProcess to ease the job. I wrote it against Qt 4.3.2, 
but it should work with any Qt 4 version. It most likely will not 
compile against Qt 3 (any version). It only runs on *nix, not Windows. 
It might run on Mac, though it's untested.

The program recursively finds all duplicates in a list of directories, 
and moves one of the duplicate files from each set to a master 
directory, symbolically linking to it from all the other duplicates and 
its previous location. Oh, and you can specify a file suffix so it only 
operates on files that end in a certain extension (or leave it blank). 
If you've got a lot of copied files lying around, this might help you 
clean them up.

If anyone finds it useful, let me know. I sure did.


P.S. This certainly isn't a shining example of Qt's awesomeness, but it 
works okay'ish, and the code isn't awful. :)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qduper.cxx

More information about the PLUG mailing list