LinuxCommandLibrary

jdupes

Find and delete duplicate files

TLDR

Search a single directory

$ jdupes [path/to/directory]
copy

Search multiple directories
$ jdupes [directory1] [directory2]
copy

Search all directories recursively
$ jdupes [[-r|--recurse]] [path/to/directory]
copy

Search directory recursively and let user choose files to preserve
$ jdupes [[-d|--delete]] [[-r|--recurse]] [path/to/directory]
copy

Search multiple directories and follow subdirectores under directory2, not directory1
$ jdupes [directory1] [[-R|--recurse:]] [directory2]
copy

Search multiple directories and keep the directory order in result
$ jdupes [[-O|--param-order]] [directory1 directory2 directory3 ...]
copy

SYNOPSIS

jdupes [options] directories...

PARAMETERS

-r
    Recursively search the given directories.

-s
    Summarize duplicate file information.

-d
    Delete duplicate files (with user confirmation).

-N
    Do not query the user, delete files non-interactively. Use with care!

-1
    Print one line per file, useful for scripting.

-L
    Follow symbolic links.

-O
    Write results to file.

-m
    Show progress information.

-q
    Quiet mode.

-v
    Show version information and exit.

-h
    Show help message and exit.

DESCRIPTION

jdupes is a command-line tool for identifying and optionally deleting duplicate files. Unlike simple checksum-based duplicate finders, jdupes performs thorough comparisons, including byte-by-byte verification, to ensure true duplication. This minimizes the risk of false positives. It's particularly useful for cleaning up disk space occupied by redundant files, especially in large file systems like media collections or backups.

jdupes offers a flexible set of options for controlling its behavior, including recursive directory traversal, ignoring hidden files, displaying detailed output, and securely deleting duplicate files. The user must confirm the deletion to prevent accidental loss of important files.

jdupes is designed to be safe and efficient, but users should always exercise caution when deleting files, especially when using automated deletion options. It's recommended to test jdupes on a small subset of files before running it on an entire file system.

CAVEATS

Always double-check the files selected for deletion before confirming, especially when using non-interactive deletion. Backups are strongly recommended before using any file deletion tool.

RETURN CODES

jdupes returns 0 on success and a non-zero value on error.

HISTORY

jdupes is a fork of fdupes. It was created to improve upon some perceived shortcomings of fdupes. jdupes continues to be actively maintained.

SEE ALSO

fdupes(1), md5sum(1), sha256sum(1), rm(1)

Copied to clipboard