Post

Remove Duplicates in Linux

Introduction to fdupes

I knew I could use fdupes to identify the dupes, but I wanted to replace them with hardlinks. I’ve seen many bash scripts that pipe the output from fdupes -r to view them. On newer distros, Ubuntu 12.04, fdupes has a -L option that will replace the duplicates with hardlinks.

1
 apt-get install fdupes 
1
 fdupes -r -L /marketing 

On older versions of Ubuntu 10.04 the -L option does not exist. I grabbed and compiled a newer version of fdupes from this repository to support the -L option.

This post is licensed under CC BY 4.0 by the author.