如何在当前工作目录中递归删除所有不带.txt和.exe扩展名的文件?我需要一线。
.txt
.exe
我试过了:
find . ! -name "*.txt" "*.exe" -exec rm -r {} \ find -type f -regextype posix-extended -iregex '.*\.(txt|exe)$'
linux shell
linux ×1
shell ×1