I have tree of folders as follow:
parent folder ....folder A ....folder B ....folder 1 ....folder 2 ....folder C ....folder 1 ....folder 2 ....folder D ....folder 1 ....folder 2 . .
Inside every folder I have a punch of files. These files have different extensions (zip, tar.gz, jpeg, bmp, csv, xlsx, doc, txt, ...etc)
How can I delete all the files in the folders except the files *.jpeg.
How can I delete all the files in the folders except more than one type of file ( e.g. except the files *.jpeg , *.csv)
In order to achieve this I was thinking of using the command:
find . type -f -exec
But I don't know how to complete it!..
Any other ways to do it ?