Remove all files except specific extension
Date: July 30, 2020
To recursively remove all files except those with a specific extension use this:
find . -type f ! -name '*.txt' -delete
To recursively remove all files except those with a specific extension use this:
find . -type f ! -name '*.txt' -delete