If you want to exclude files by name, you can use this syntax:
find . -type f ! -name '*.mp3' ! -name '*.mp4' -size +1M -delete
or if your find
does not support delete
:
find . -type f ! -name '*.mp3' ! -name '*.mp4' -size +1M -exec rm {} \;
If you want to exclude files by name, you can use this syntax:
find . -type f ! -name '*.mp3' ! -name '*.mp4' -size +1M -delete
or if your find
does not support delete
:
find . -type f ! -name '*.mp3' ! -name '*.mp4' -size +1M -exec rm {} \;