Exclude a sub-directory using find

前端 未结 6 1878
鱼传尺愫
鱼传尺愫 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:45

    -name only matches the filename, not the whole path. You want to use -path instead, for the parts in which you are pruning the directories like def/incoming.

提交回复
热议问题