Crates.io | detecteff |
lib.rs | detecteff |
version | 0.3.1 |
source | src |
created_at | 2024-05-13 21:19:06.911832 |
updated_at | 2024-05-19 20:26:22.639379 |
description | Find and delete duplicate files |
homepage | |
repository | https://github.com/d33pster/detecteff |
max_upload_size | |
id | 1238878 |
size | 31,162 |
[ Detecteff ] (DetectF or Detective) is a command-line utility to find duplicate files in a directory.
.
as they are not to be messed with.NOTE: If scanning the HOME
directory of your OS, be careful as some directories shouldn't be messed with like the Library
and Applications
folder in macOS. Try scanning individual directories in the home directory.
For Example
Suppose this is your Directory structure for HOME
directory.
~/--- |
abc.txt
dir1/--- |
xyz.txt
123.txt
dir2/--- |
456.txt
hehe.txt
hello.txt
...
Do not scan the HOME
directory directly. Try scanning the individual directories instead.
OR if you really need to, try the --ignore
flag to mention directories to ignore (case insensitive).
ADDITIONAL NOTE:
--delete
or -d
flag to delete the temp files, check the list of files that will be deleted (white background, red foreground) that will be printed after scanning.In terminal run:
$ cargo install detecteff
Installing detecteff v0.3.1
Updating crates.io index
Compiling libc v0.2.155
Compiling option-ext v0.2.0
Compiling colorized v1.0.0
Compiling dirs-sys v0.4.1
Compiling dirs v5.0.1
Compiling rustypath v0.1.1
Compiling argrust v0.1.0
Compiling detecteff v0.3.1 (/Users/XXXXXX/detecteff)
Finished `release` profile [optimized] target(s) in 2.02s
For help, run in terminal:
$ detectf --help
detecteff help
-
[INFO]
| -h, --help : show help text and exit.
| -v, --version : show version and exit.
-
[FLAG]
| -r, --recursive : recursive mode. Default -> OFF
| -f, --format : show formatted output. Default -> OFF
-
[INPUT]
| -s, --scan <directory> : scan the directory for duplicate files. (Mandatory)
| -i, --ignore <directory1>, <directory2>, ... : ignore these directories. (Optional)
-
[IRREVERSIBLE FLAG]
| -d, --delete : delete any found duplicates. Default -> OFF
By default, Windows terminal doesn't support ANSI colour codes which are implemented in v0.3.1
. You can fix this by:
Run the following command to download the fix-terminal.bat
file from the detecteff
repository.
curl
curl -o fix-terminal.bat https://raw.githubusercontent.com/d33pster/detecteff/main/fix-terminal.bat
wget
wget -O fix-terminal.bat https://raw.githubusercontent.com/d33pster/detecteff/main/fix-terminal.bat
Go to https://github.com/d33pster/detecteff
and click on the fix-terminal.bat
file and then click the download button.
Double Click the fix-terminal.bat
to check and fix the Windows Registry for ANSI colour support in CMD.
Deteceff
can be used to scan for duplicated files that were left behind by either user, programs or because you downloaded some file again 'cause you weren't able to find the first copy of the file. Whatever it may be, Detecteff
is the solution.
NOTE: The longer arguments are used here, but feel free to use the short versions or a combination of long or short arguments as you please. To implement this argument parsing in your own project, checkout argrust
Search for duplicate files in a directory:
detectf --scan <directory>
Search for duplicate files in a directory tree (recursive):
detectf --scan <directory> --recursive
Show the output in a formatted manner:
detectf --scan <directory> --recursive --format
DELETE the found duplicated files. (need to scan again as of
v0.3.1
. Will be fixed inv0.3.2
)
detectf --scan <directory> --delete
For help:
detectf --help
For version:
detectf --version