Forrest logo
back to the fdupes tool

fdupes:tldr:9335a

fdupes: Search recursively for duplicates and display interactive prompt to pick which ones to keep, deleting the others.
$ fdupes -rd ${path-to-directory}
try on your machine

The command fdupes -rd ${path-to-directory} is used to find and manage duplicate files within a specified directory. Here is a breakdown of each component:

  • fdupes stands for "find duplicate files". It is a command-line program available on Unix-like systems (including Linux) that aids in locating and handling duplicate files.
  • -rd are command-line options or flags passed to the fdupes command.
    • -r enables recursive file searching, meaning it searches for duplicates not only in the specified directory but also in its subdirectories.
    • -d prompts the user to choose which files to keep when duplicates are found. It offers options to delete, preserve, or replace duplicate files.
  • ${path-to-directory} is the placeholder for the actual path to the directory you want to scan for duplicates. It should be replaced with the specific path on your system.

To use this command, you need to replace ${path-to-directory} with the actual directory path you want to examine for duplicate files. The command then recursively searches the specified directory and all its subdirectories for duplicates. When duplicate files are detected, it prompts you to interactively decide the action to take for each duplicate file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the fdupes tool