Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible with rsync to not create directories on destination?

Imagine I have that source :


And that I have this destination :


The wanted result of rsync source destination :


Of course my real situation involves thousand files/folders structure and I don't want solutions involving explicit list of synced folders, which I can do. I'm looking for a clean way just to prevent any folder creation on destination. By exclude or filtering... That could even be something outside rsync, like a hack with permissions if rsync can't do this...

For information, this is really easy to get this kind of situations, in my case I have:

  • A server with 2 disks, let's say A & B. And a local drive C.
  • I usually use rsync to sync (and merge) remote A & B into local C.
  • Then sometimes I just want to sync back some C files into A and B. (Just new Files... not non-existing folders on destination)

merged by DMA57361 Jul 29 '11 at 13:35

This question was merged with rsync synchronizing files only without creating folders on destination because it is an exact duplicate of that question.

migrated from Jul 29 '11 at 12:28

This question came from our site for professional and enthusiast programmers.

You must log in to answer this question.

Browse other questions tagged .