linux删除指定文件夹中某个文件除外的其他文件

 rm -rf !(file1|file2)

原文地址:https://www.cnblogs.com/qiumingcheng/p/13370247.html