How to find duplicate files on drives that aren’t plugged in (Mac)

Plug each drive in once: Drawerful reads it and remembers what’s on it, so the drive can go back in the drawer. Every later scan compares new files against the drives in the drawer too, and lists those copies with the drive marked “not plugged in”.

Why this is hard

Finder and most duplicate finders only compare what’s mounted: the drives plugged in right now. A drive in a drawer doesn’t exist for them. To compare five old drives, you need all five plugged in at once, with enough ports and an afternoon to spare, and you start again the next time.

The way round it is to keep a record of each drive while it’s plugged in, and compare the records later. There are three ways to do that.

Option 1: a disk cataloguer, such as NeoFinder

A disk cataloguer keeps a catalogue of your drives, including offline ones, so you can search them when they aren’t plugged in. NeoFinder is one. Its Find Duplicates searches the catalogues for files that appear more than once, matched by name or by an MD5 checksum it can store.

If you already keep your drives in a cataloguer, start there. We’ve put the two apps side by side.

Option 2: Terminal, with a checksum list per drive

Free and exact. A checksum is a short code worked out from every byte of a file: two files with the same SHA-256 checksum have the same contents, whatever their names. You make one list per drive while it’s plugged in, keep the lists on your Mac, and compare them later with no drive plugged in.

1. While a drive is plugged in, save its list

mkdir -p ~/drive-lists
find "/Volumes/Backup 2019" -type f -size +1M -not -path '*/.*' -print0 \
  | xargs -0 shasum -a 256 > ~/drive-lists/"Backup 2019.txt"

Replace Backup 2019 with the drive’s name (it’s in /Volumes), eject it, and do the same for the next drive. This skips hidden files and anything under 1 MB.

2. Later, with no drive plugged in, compare the lists

cd ~/drive-lists
cut -c1-64 *.txt | sort | uniq -d > ~/dupes.txt
grep -F -f ~/dupes.txt *.txt | sort -t: -k2

This prints every file whose contents appear more than once, on one drive or across several, grouped by checksum, with the list (the drive) it came from at the start of each line.

Only what two drives share

join <(cut -c1-64 "Backup 2019.txt" | sort -u) <(cut -c1-64 "Photos (old).txt" | sort -u) > ~/shared.txt
grep -F -f ~/shared.txt "Backup 2019.txt" "Photos (old).txt" | sort -t: -k2

Things to know. Making a list reads every byte, so a few terabytes can take many hours. A list is only as fresh as the day you made it: if you change a drive, make its list again. And the lists only tell you where the copies are. Before you delete one, plug both drives in and check that both copies are still there and still the same.

Option 3: how Drawerful does it

  1. Plug each drive in once and scan. Drawerful keeps every file’s drive, folder, name, size and modified date, plus a checksum for the files it had to compare. It keeps no copies of your files. Scanning only reads: nothing changes on the drive.
  2. Put the drive back in the drawer. On Home it keeps its card, with “Last seen 2 days ago” or “Not plugged in”. Every later scan compares against it too.
  3. Review. A copy on a drive in the drawer is listed with the drive marked, for example “stays on 2TB SSD, not plugged in”.
  4. Set aside. A set-aside that needs a drive that isn’t plugged in waits, and nothing happens to it until the drive is back. Then both copies are read in full before anything moves. Drawerful never relies on the stored checksum alone.
  5. Plug it back in when you like. Home says the drive is back, and you scan it, or finish the set-aside, when you’re ready. Nothing runs on its own.

Spare copies are set aside on their own drive, not deleted, and Restore puts them back any time, licence or not.

Questions

Does Drawerful copy my files?

No. It keeps each file’s drive, folder, name, size and modified date, plus a checksum for the files it had to compare. The files themselves stay on their drives.

What if I change a drive while it’s in the drawer?

Drawerful knows the drive as it was at its last scan, and nothing is set aside on the strength of that memory: when the drive is back, both copies are read in full before anything moves. To bring the list up to date, scan the drive again when it’s plugged in.

Do I need every drive plugged in to set copies aside?

No. Copies whose drives are plugged in can be set aside now. A copy waits if its own drive isn’t plugged in, or if every copy that proves it is a duplicate is on a drive that isn’t, and nothing happens to it until that drive is back.

Which drives work?

Drives formatted as APFS, HFS+, exFAT or FAT32, including SD cards and USB sticks. Time Machine backup disks and mounted disk images (.dmg) are never scanned.

Drawerful finds the copies for you.

It reads every drive once, remembers the ones in the drawer, and sets the spare copies aside on the same drive. Nothing is deleted on its own, and Restore always works.

See how it works