← 返回命令列表

Linux command

rdfind 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Find duplicates

rdfind [directory]

Find in multiple directories

rdfind [dir1] [dir2]

Delete duplicates

rdfind -deleteduplicates true [directory]

Create hardlinks

rdfind -makehardlinks true [directory]

Create symlinks

rdfind -makesymlinks true [directory]

Dry run

rdfind -dryrun true [directory]

Output results file

rdfind -outputname [results.txt] [directory]

说明

rdfind (redundant data find) efficiently locates duplicate files across one or more directory trees using a multi-phase detection algorithm. It first groups files by size, then computes partial checksums on the first bytes of same-sized files, and finally performs full checksums only on files that still match, making it fast even on large file sets. Once duplicates are identified, rdfind can delete them, replace them with hardlinks (saving disk space while keeping the same path), or replace them with symbolic links. A results file lists all duplicates found for manual review, and the -dryrun flag simulates operations without modifying the filesystem. The first file encountered in the argument order is always kept as the original.

参数

-deleteduplicates _BOOL_
Delete duplicates.
-makehardlinks _BOOL_
Replace with hardlinks.
-makesymlinks _BOOL_
Replace with symlinks.
-dryrun _BOOL_
Simulate only.
-ignoreempty _BOOL_
Ignore empty files.
-removeidentinode _BOOL_
Remove same inode files.
-outputname _FILE_
Results filename.
-minsize _BYTES_
Minimum file size.

FAQ

What is the rdfind command used for?

rdfind (redundant data find) efficiently locates duplicate files across one or more directory trees using a multi-phase detection algorithm. It first groups files by size, then computes partial checksums on the first bytes of same-sized files, and finally performs full checksums only on files that still match, making it fast even on large file sets. Once duplicates are identified, rdfind can delete them, replace them with hardlinks (saving disk space while keeping the same path), or replace them with symbolic links. A results file lists all duplicates found for manual review, and the -dryrun flag simulates operations without modifying the filesystem. The first file encountered in the argument order is always kept as the original.

How do I run a basic rdfind example?

Run `rdfind [directory]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -deleteduplicates _BOOL_ do in rdfind?

Delete duplicates.