Skip to content
Beta version. Feedback: contact form

How to find duplicate DDD files

Tachospecto teamDDD file archiving and analysis
· 1 min read

In an archive that grows for years, duplicates are inevitable. The catch is that a “duplicate” can mean two things: exactly the same file, or two different downloads that partly cover the same days.

1. Two kinds of “duplicates”

  • Identical files – the same content byte for byte, often under different names. One copy is enough.
  • Overlapping downloads – different files from the same card that partly cover the same period. These are not duplicates: each is a separate record and both should be kept.

2. Identical files: compare SHA-256 checksums

Files with the same SHA-256 are identical. You can compute and group the checksums of all files in a folder, e.g. in PowerShell:

# Windows (PowerShell) – groups of identical files
Get-ChildItem -Recurse -File | Get-FileHash -Algorithm SHA256 |
  Group-Object Hash | Where-Object Count -gt 1 |
  ForEach-Object { $_.Group.Path; '' }

# Linux / macOS
find . -type f -exec sha256sum {} + | sort | uniq -w64 -D

3. Overlapping downloads

A card stores data for many weeks, so consecutive downloads always overlap partly. When analysing days, those repeated in several files should be counted once, and when files differ for the same day, check which download is newer.

Related articles

All articles →
Data archiving

How to organise DDD files in a transport company

Read article
Security and verification

How to check that a DDD file is original: SHA-256 and digital signatures

Read article