I'm one of those people who can't stand a messy laptop; I don't keep around files I don't need and I refuse to install apps unless I absolutely need them. Unfortunately Mac OS X and Windows generate files whenever they like, like .DS_Store
and Thumbs.db
. Sure they serve their purpose but that doesn't mean the clutter doesn't annoy me.
我就是那些无法忍受一台凌乱的笔记本电脑的人。 我不会保留不需要的文件,除非我绝对需要它们,否则我将拒绝安装应用程序。 不幸的是,Mac OS X和Windows会根据需要.DS_Store
生成文件,例如.DS_Store
和Thumbs.db
。 当然,它们能够达到目的,但这并不意味着混乱不会使我烦恼。
If you want to recursively find delete files you don't want, there's a simple way to do that:
如果要递归查找不需要的删除文件,有一种简单的方法可以做到这一点:
find . -name '.DS_Store' -type f -delete
You can use *
as a wildcard too:
您也可以将*
用作通配符:
find . -name '*.zip' -type f -delete
Of course my cleanup only lasts a short time, but hey -- you can use this command for more intelligent purposes!
当然,我的清理只会持续很短的时间,但是,嘿,您可以使用此命令来达到更智能的目的!