Linux – Recursively Deleting Selected Files
Writing it up here because I keep having to do it and can never remember how:
find . -name *.txt -exec rm -rf {} ;
Writing it up here because I keep having to do it and can never remember how:
find . -name *.txt -exec rm -rf {} ;
also you can use back tick to execute a command within a command.
i.e.
rm `find . -name *.txt`
will delete all the files that the find outputs.