remove all files matching a pattern in subdirectories 1

remove all files matching a pattern in subdirectories

find . -type f -name '' -delete

# OR 

find . -type f -name '' -exec rm {} +

Here is what the above code is Doing:
1. find . -type f -name ‘
– find all files in the current directory (.)
– that match the pattern
2. -delete
– delete the files

Similar Posts