Tzook Bar Noy
Tzook Bar Noy

Reputation: 11677

rsync exclude folder contents but still create folder

I have my application:

folder1
folder2
cache
     something_cached1
     something_cached2

now I want to rsync my project to the server

BUT

if I do

 --exclude=cache

the folder won't be existing in the server so, I will get an error from the application as it tries to write to a non existent location

Upvotes: 2

Views: 1157

Answers (1)

Tzook Bar Noy
Tzook Bar Noy

Reputation: 11677

quite simple I see, just add:

--exclude 'cache/*'

Upvotes: 8

Related Questions