find 命令如何避免搜索项目的时候把 .git 目录里的内容也给搜出来


find 命令如何避免搜索项目的时候把 .git 目录里的内容也给搜出来, .git 是项目 repo 的隐藏目录

shell bash

无辜的路人甲 10 years, 10 months ago

find . -type f -path .git -prune -o -name "*.php" -print
主要就是-path .git -prune -o这段,具体可以看stackoverflow上的 答案

xiire answered 10 years, 10 months ago

find ./ --name something | grep -v .git

BLACK小月 answered 10 years, 10 months ago

Your Answer