3 ms·
find <dir> -name <pattern> | xargs rm Test it with just the "find" first as you experiment with <pattern>
by jjgreen 6y ago
find <dir> -name <pattern> | xargs rm
Test it with just the "find" first as you experiment with <pattern>
- 5422m4n 6y agosure, I could do that, but I remember recently there was a tool, I believe written in rust, that was coming with a lot of patterns pre build in that tests for a lot different contexts (rust, node, cmake, java, flutter etc) and then lists all those directories that then can be piped to rm or tar or whatever.