2017-10-08 158 views
0

我擁有的是這個。rsync排除只在特定文件夾下的文件夾

/home/EverythingElse/files.any 
/home/AndroidStudioProjects/Project1/build/files.any 
/home/AndroidStudioProjects/Project2/build/files.any 
/home/AndroidStudioProjects/Project3/build/files.any 
/home/AnotherThing/build/filesToBackup.any 

我想使用rsync備份一切,除了在AndroidStudio下的任何build文件夾中的文件,但我想包括AnotherThing下的build目錄。

我所追求的是如何通配排除字符串的中間。

更新:我發現

--exclude AndroidStudioProjects/**/build/** 

作品,但離開build目錄空。我想也沒有構建目錄。

回答

0

好吧,解決它。答案是:

--exclude AndroidStudioProjects/**/build/