This is a Python tool that allows scanning a directory to find duplicate files. It uses the file hash to determine if a file is duplicated. When a duplicate file is found, its path is displayed on the screen. The duplicate files can also be deleted or overwritten as they are found.
- Clone the repository
$ git clone https://github.com/arg0n3x/scanndf.git
- Grant execution permissions to the script
$ chmod 700 scanndf
- Run the script by passing the -d parameter and providing a directory containing files
$ ./scanndf -d <directory path>
This script contains two essential parameters that allow deleting or overwriting duplicate files.
-r
This parameter tells the script to only delete the files.
-o
This parameter tells the script to overwrite the files, which is done using the shred
command.
NOTE: Consider whether you want to delete the files and be cautious when using the -o parameter.