in reply to Beginner question about files deletion
Or, from Perl:$ find a/b -maxdepth 1 '!' -name '*.zip' -type f -exec rm '{}' ';'
If you're silly enough to put newlines in your filenames, useunlink `find a/b -maxdepth 1 '!' -name '*.zip' -type f`;
unlink split /\x00/, `find a/b -maxdepth 1 '!' -name '*.zip' -type f - +print0`;
|
|---|