Mac删除讨厌的.DS_Store文件夹(Mac delete annoying. DS_ Store folder)

先设置好path,然后删除,直接写在find后也行:

deletepath=/
sudo find $deletepath -name ".DS_Store" -depth -exec rm {} \;

可以加.gitignore文件以忽略一些无关文件:

.gitignore
*.[oa]git
.idea/
.DS_Store
/cmake-build-debug/
————————

Set the path first, then delete it, and write it directly after find:

deletepath=/
sudo find $deletepath -name ".DS_Store" -depth -exec rm {} \;

You can add a. Gitignore file to ignore some irrelevant files:

.gitignore
*.[oa]git
.idea/
.DS_Store
/cmake-build-debug/