Duplicate File Remover
1.1.1
Command line utility to remove exact duplicate files.
|
A command line utility that recursively scans the set directory to find exact duplicate files inside all the sub-directories. The files so found can be listed in an output file. If required the duplicates can also be removed, thereby preserving a single unique file.
Features:
Future Plans:
Caution: As of now, there is no way to select which of the duplicate files will be preserved. The selection happens on the order in which they are loaded into
std::map
. The first file is the one which is preserved.
For main program:
sudo apt-get install libssl-dev libboost-filesystem-dev libboost-system-dev
For tests, apart from the dependencies for main program:
sudo apt-get install libcppunit-dev
Clone the project:
git clone https://github.com/vishal-wadhwa/Duplicate-File-Remover.git
Change directory to src:
cd Duplicate-File-Remover/src
Build project using Make utility (assuming you've downloaded the dependencies):
make main
Run it (See Usage):
./main ...
From the root directory of the project go to tests directory:
cd Duplicate-File-Remover/tests
Build tests using Make utility (assuming you've downloaded the dependencies):
make test
Run them tests, bruh:
./test
You should see OK if all the tests pass and then you can go on to using the program. ;)
-d
switch to set the directory to be scanned.-e
switch to provide a list of extensions to filter the files scanned.-o
switch to generate an output(log) file. If this switch is not followed by a name/path, then a default file dupl_file.txt is generated in the current directory.-r
switch to remove the duplicates and keep only one copy.-h
switch to display this help:Note: Use
sudo
if required.
./main -d ./ -o -r
./main -e png jpg jpeg -d ./../ -o log.out
./main -d ./ -r