20160826/57bfed0f3571d.jpg

The best life is use of willing attitude, a happy-go-lucky life.

— Mr.Wang

头像

Linux反选删除文件

发布时间:2016-08-26 15:17:35

发布作者:admin

7522

最简单的方法是# shopt -s extglob      (打开extglob模式)

# rm -fr !(file1)

如果是多个要排除的,可以这样:

# rm -rf !(file1|file2)


相关文章:
  1. Linux Centos openresty 编译安装
  2. 将Centos的yum源更换为国内的阿里云源
  3. Packagist / Composer
  4. CentOS7 安装 Pure-ftpd