一般地,我們有如下兩種方式
shopt -s extglob
rm -rf !(AmbaConfig)
shopt -u extglob
或者
#!/bin/bash
dir=$(pwd)
cd $dir/juju/
pwd
ls |grep -v AmbaConfig |xargs rm -rf
一般地,我們有如下兩種方式
shopt -s extglob
rm -rf !(AmbaConfig)
shopt -u extglob
或者
#!/bin/bash
dir=$(pwd)
cd $dir/juju/
pwd
ls |grep -v AmbaConfig |xargs rm -rf