批量查找&使用find命令问题删除linux上的文件 [英] Batch find & remove files on linux using find command problem
本文介绍了批量查找&使用find命令问题删除linux上的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我试图在ubuntu中使用 find 命令删除Windows分区中的所有thumbs.db文件:
Hi everybody I'm trying to remove all thumbs.db files in a Windows partition using find command in ubuntu:
find . -iname "*.db"|while read junk;do rm -rfv $junk;done
它不为我工作,没有什么发生!
我做了这个技巧删除我的垃圾文件之前的Ubuntu的以前的版本,但现在最新版本的Ubuntu我不能。
我的命令有什么错误吗?
But it's not working for me and nothing happens! I did this trick to remove my junk files before on previous version of Ubuntu but now on latest version of Ubuntu I can't. Is there any bug in my command?
推荐答案
我这样做:
find . -iname 'thumbs.db' -exec rm -rfv {} +
即使您的目录在其名称中包含空格。
This way, it still works even if your directories contain whitespace in their names.
这篇关于批量查找&使用find命令问题删除linux上的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文