find 命令如何避免搜索项目的时候把 .git
目录里的内容也给搜出来,.git
是项目 repo 的隐藏目录
find ./ --name something | grep -v .git
find . -type f -path .git -prune -o -name "*.php" -print
主要就是-path .git -prune -o这段,具体可以看stackoverflow上的答案
find 命令如何避免搜索项目的时候把 .git
目录里的内容也给搜出来,.git
是项目 repo 的隐藏目录
find ./ --name something | grep -v .git
find . -type f -path .git -prune -o -name "*.php" -print
主要就是-path .git -prune -o这段,具体可以看stackoverflow上的答案