Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The simplest would be

    find /path/to/wherever -name "*.mp3" -delete
This works at least in GNU find and FreeBSD.


At which point I'd argue that using -exec with an appropriate command is simpler, in the general case, than using one of find(1)'s many, many, many twiddly little command-line arguments. Granted, -exec spawns a process per file, but processor cycles are cheaper than brain cycles, &c., &c.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: