Deleting files with search in Bash

If we want to delete, for example, only *.js files in the given directory and subdirectories:

find . -name "*.js" -print0 | xargs -0 rm -rf

 

5/5 - (3 votes)

Leave a Comment

Scroll to Top