网上盛传 rm -rf !(文件名)这种参数,但我这里总提醒我 -bash: !: event not found
|
ToughGuyMay 19, 2016
1
先执行这个:
shopt -s extglob 然后再试 rm -rf !(文件名) |
|
clinoMay 19, 2016
2
你可以用 find .|grep xxx|xargs rm -rfv
这样在 grep 这里可以用正则表达式之类的过滤 |
|
ffffwhMay 19, 2016 via Android
5
rm 一时爽
|
|
gqkkkMay 19, 2016
8
find 条件|xargs rm
|
|
qwerasdfMay 19, 2016
9
删除 the/dir 目录下的多个指定文件
rm `ls -a the/dir grep | xxx` |
|
xiaozMay 19, 2016 via iPhone
10
|
|
cxbigMay 19, 2016
11
建议用 find 出来结果再用 rm ,容易把握。
|
|
reticentfatMay 19, 2016
12
rm -f `ls *.*|egrep -v "(a.bbb|*.ccc)"`
|