1 Answer
Answer:
To Find and Delete all Duplicate Files/rpm in Specified Directory/Location in Centos using rdfind command
Step1: install epel-release using following command
yum install epel-release -y
step2: install rdfind
yum install rdfind
step:3
use the Below command to find and delete the duplicates
rdfind . | cat results.txt -| rdfind -deleteduplicates true .
[root@localhost ~]# rdfind . | cat results.txt -| rdfind -deleteduplicates true .
Now scanning ".", found 69 files.
Now have 69 files in total.
Removed 0 files due to nonunique device and inode.
Total size is 9332104 bytes or 9 MiB
Removed 50 files due to unique sizes from list.19 files left.
Now eliminating candidates based on first bytes:removed 13 files from list.6 files left.
Now eliminating candidates based on last bytes:removed 3 files from list.3 files left.
Now eliminating candidates based on sha1 checksum:removed 0 files from list.3 files left.
It seems like you have 3 files that are not unique
Totally, 2 MiB can be reduced.
Now making results file results.txt
Now deleting duplicates:
Deleted 2 files.
Your Answer
x