rm recursive file pattern 1

rm recursive file pattern

find . -name "*.bak" -type f -delete

Here is what the above code is Doing:
1. find all files in the current directory and subdirectories
2. that have a .bak extension
3. and are a regular file (not a directory)
4. and delete them

Similar Posts