用 Shell 删除出某些文件外的所有文件

rm `ls *.log | grep -vE "aaa\.log|bbb\.log"`

编程技巧