Finding duplicate files in Ubuntu

Since 2005, I've been backing up my data regularly, but unfortunately, I've never sorted the backed up data. When that data comes from several computers, there is only one outcome: Duplicate files!

Fortunately, there is a tool in the Ubuntu package repository called fdupes.

Finding duplicate files with fdupes

The command I used was:

fdupes backup --omitfirst --recurse > duplicate_files

backup is the directory where I keep my backups (mounted over nfs).
--omitfirst makes fdupes not print the first file it finds a duplicate of.
--recurse makes fdupes recurse into subdirectories.

If you feel confident, you can make fdupes delete files there are duplicates of, like so:

fdupes some_directory --recursive --delete --noprompt

Written by Jannich Brendle ons 14 september 2011 In How to

tags: managing datauseful utilitiesxubuntu

Related posts

social