
使用此命令,我複製不同的檔案並將其替換到目標位置。
rsync -av --existing web/src/main/webapp/com/* web/target/project/com/
如何僅替換具有.xhtml
擴展名的檔案?
答案1
在您的命令中*
,將擴展到“src”目錄中的任何類型的文件,這意味著所有這些文件(甚至是目錄),*.xhtml
您只能定位具有.xhtml
擴展名的文件。
rsync -av --existing web/src/main/webapp/com/*.xhtml web/target/project/com/
使用此命令僅更新xhtml
擴展名為 in 的 檔案。web/target/project/com/