# Freedup

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Freedup
> Markdown URL: https://mediated.wiki/source/Freedup.md
> Source: https://en.wikipedia.org/wiki/Freedup
> Source revision: 1353624705
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

**freedup** is a [program](/source/Computer_program) to scan [directories](/source/Directory_(computing)) or file lists for duplicate [files](/source/Computer_file). The file lists may be provided to an [input pipe](/source/Pipeline_(Unix)) or internally generated using [find](/source/Find_(Unix)) with provided options. There are more options to specify the search conditions more detailed. Other options influence the performed actions, i.e. whether to display only or to specify what kind of link under which circumstances. freedup first compares file sizes, then on equal sizes the [MD5 signatures](/source/MD5), and before taking actions a byte-by-byte check for verification is performed. An interactive mode allows to decide individually which files to [link soft](/source/Symbolic_Link) or [hard](/source/Hard_Link) or to delete.

The comparison by ignoring [metadata](/source/Metadata) tags and comments is a unique feature of *freedup*. Filesize, start and end of unique content is kept for later processing. Comparing [sound files](/source/Sound_file) you may ignore the tags, e.g. whether one is tagged with an [ID3v1](/source/ID3v1)-tag while another sound file with identical music is tagged with [ID3v2](/source/ID3v2). It also works, if you copied and retagged the copy to fit into another album. This works for [JPEG](/source/JPEG) files ([Exif](/source/Exif)) and [mp4](/source/Mp4)-Movies as well. An auto-Mode is supported to instruct *freedup* to ignore all tags that are recognized. The author will extend this function on demand, if there is sufficient documentation how to strip the tags.

freedup is written in [POSIX](/source/POSIX) compliant [C](/source/C_(programming_language)) and is released under the [GNU General Public License](/source/GNU_General_Public_License). Its complexity is [O(n log n)](/source/Big-o_notation) for full file comparison. This is done for equally long files after sorting according to filesize using [qsort](/source/Qsort).[1]

## See also

- [List of Unix commands](/source/List_of_Unix_commands)
- [Duplicate code](/source/Duplicate_code)

## References

1. ["What is POSIX (Portable Operating System Interface)?"](https://www.techtarget.com/whatis/definition/POSIX-Portable-Operating-System-Interface). *WhatIs.com*. Retrieved 2023-04-16.

## External links

- [Official site](http://freedup.org/)

---
Adapted from the Wikipedia article [Freedup](https://en.wikipedia.org/wiki/Freedup) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Freedup?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
