Exclude a sub-directory using find

前端 未结 6 1924
鱼传尺愫
鱼传尺愫 2021-01-30 18:54

I have directory structure like this

data
|___
   |
   abc
    |____incoming
   def
    |____incoming
    |____processed
   123
    |___incoming
   456
    |___i         


        
6条回答
  •  轮回少年
    2021-01-30 19:41

    By following answer for How to exclude a directory in find . command:

    find . \( -name ".git" -o -name "node_modules" \) -prune -o -print
    

提交回复
热议问题