← 返回命令列表

Linux command

duff 命令

文件

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

常用示例

Find duplicate files in directory

duff [directory]

Find duplicates recursively

duff -r [directory]

Show only duplicate file names

duff -q [directory]

Follow symlinks

duff -L [directory]

Compare files from multiple directories

duff [dir1] [dir2] [dir3]

Exclude empty files

duff -z [directory]

说明

duff (Duplicate File Finder) identifies duplicate files by comparing file sizes and contents. It groups files with identical content, making it useful for finding and removing redundant files to free disk space. The tool first groups files by size, then compares content using checksums and byte-by-byte comparison when necessary. Output shows clusters of duplicate files separated by blank lines.

参数

-r, --recursive
Search directories recursively.
-q, --quiet
Quiet mode; only print file names.
-L, --follow-links
Follow symbolic links.
-z, --no-empty
Exclude empty files.
-t, --thorough
Perform thorough (slow) comparison.
-e, --excess
Only list excess duplicates, not first occurrence.
-f _format_
Custom output format.
-l _limit_
Limit number of duplicates to report.

FAQ

What is the duff command used for?

duff (Duplicate File Finder) identifies duplicate files by comparing file sizes and contents. It groups files with identical content, making it useful for finding and removing redundant files to free disk space. The tool first groups files by size, then compares content using checksums and byte-by-byte comparison when necessary. Output shows clusters of duplicate files separated by blank lines.

How do I run a basic duff example?

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

What does -r, --recursive do in duff?

Search directories recursively.