好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

linux 删除所有后缀名相同的文件_删除所有匹配到的文件

# 进入tmp目录新建4个文本文件  
# cd /tmp  
# touch {1,2,3,4}.txt  
# find . -name *.txt  
find: paths must precede expression: 2.txt
# echo *  
1.txt 2.txt 3.txt 4.txt  
# echo '*'  
*  
# echo \*  
*
# find . -name '*.txt'  
find . -name '*.txt'  
./4.txt  
./2.txt  
./3.txt  
./1.txt  
#或者使用反斜杠  
 find . -name \*.txt  
./4.txt  
./2.txt  
./3.txt  
./1.txt

查看更多关于linux 删除所有后缀名相同的文件_删除所有匹配到的文件的详细内容...

  阅读:56次