3
我有多個用戶使用自己的模板的站點,現在我已更新了模板,並且希望使用find更新模板。如何使用find在指定的子目錄中查找文件
,如果我做
find . -name template.css -print -exec cp NEW_FILE {} \;
然後,所有其他template.css西港島線覆蓋到。
我只希望template.css被覆蓋,如果它們在目錄mytemplate/css中。
任何一個想法?
例子:
/site1/templates/mytemplate/css/template.css*
/site1/templates/othertemplate/css/template.css
/site1/templates/other2template/css/template.css
/site2/templates/mytemplate/css/template.css*
/site2/templates/othertemplate/css/template.css
/site2/templates/other2template/css/template.css
/site3/templates/mytemplate/css/template.css*
/site3/templates/othertemplate/css/template.css
/site3/templates/other2template/css/template.css
有*的文件只能被覆蓋
而且我們有「-iwholename」來執行不區分大小寫的搜索。 –