Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dedupe UI — case study

Find duplicate files by content, not by name, and send the extra copies to the Trash while always keeping one. A 124-line bash script that runs as a double-clickable Mac app.


What this repository is

A personal case study, published for review rather than reuse. One script, plus the recipe for wrapping it as a Mac app.

└── dedupe-ui.sh            folder picker, mode dialog, hashing, report, removal

The interesting parts

Every destructive default is the safe one. Report before remove. Trash rather than delete. Always keep one copy. Refuse to run if trash isn't installed rather than quietly falling back to rm. Writing a tool that touches someone's files is mostly an exercise in deciding what it should refuse to do — which is the same problem as giving an AI agent write access, and the reason this small script kept teaching me things after it worked.

Only files sharing an exact byte size are hashed. Size is free to read and a perfect negative filter, so the expensive step runs on a tiny fraction of the disk. On a real folder this is the difference between seconds and minutes.

The interface is osascript. A folder picker and a three-button dialog, no GUI framework, no dependencies. Wrapped with Platypus it becomes an app you double-click.

Run

brew install trash
./dedupe-ui.sh

To build the app: Platypus → Script Type /bin/bash, Script Path dedupe-ui.sh, Interface Text Window. The built .app isn't committed — it takes a minute to make.

Stack

Bash and macOS built-ins (shasum, find, osascript). One optional external tool.

Licence

All rights reserved. Published for review, not for reuse — see LICENSE.

External tools: see NOTICE.md.

About

Content-hash duplicate file finder for macOS. Report before remove, Trash rather than delete, always keeps one copy. Personal case study.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages