I am trying to write a command to recursively delete several files with different extensions (* .extension1, * .extension2, etc.) from the current directory and all its subdirectories.
So far, I got this command from another message , but I could not train how to adapt it to multiple files on the same command line:
find . -name "*.extension1" -type f -delete
Is it as simple as below?
find . -name "*.extension1";"*.extension2" -type f -delete
Just like a note , these are all output files that I do not need, but not all are necessarily output, so some of them may be missing. This is like a general cleaning command.
source
share