Find and delete when found

On the terminal, if you want to delete a lot of items at once without dragging them to the Finder's trashcan icon, type:

find [source folder] -name "*[whatever word you want to find]*" -delete

Beware this is not the same as dragging to the trash, it's permanent and non-recoverable. I'd suggest running this first to make sure it will delete the right things:

find [source folder] -name "*[whatever word you want to find]*" -print


Popular posts from this blog

The most useful defaults-write options

Erasing firmware password

Migrating from Windows to Mac