Dead Programmer
Dead Programmer

Reputation: 12585

List duplicate files in a directory in Unix

Is there any unix commands that can display duplicate files in a particular directory.kindly let me know your comments.

Upvotes: 2

Views: 1586

Answers (2)

Ahmad Alzoubi
Ahmad Alzoubi

Reputation: 21

fdupe is a great tool to do the job. I would also recommend rmlint. For a Linux directory (ext4) of 60 GB of photos and videos:

  • rmlint took 38 seconds to find duplicates and offer different clean up actions.
  • fdupe took 56 seconds to find the duplicates.

Upvotes: 1

Cody
Cody

Reputation: 3764

You should be able to use fdupes to achieve this.

fdupes ./directory

That should list all the duplicate files in a directory, you can also pass it -r for a recursive scan into subdirectories.

Upvotes: 5

Related Questions