Why does one of there work and the other doesn't

Martin Pool mbp at samba.org
Fri Nov 30 18:21:34 EST 2001

On 29 Nov 2001, Ian Kettleborough <ian at idk.com> wrote:

> 1. How much memory does each file to be copied need. Obvisiouly I have too many
> files.

Hard to say exactly.  On the order of a hundred bytes per file.

> 2. Why does this command work:
> 	rsync -ax /usr/xx /backup/usr/
>   when:
> 	rsync -ax /usr/xx/ /backup/usr/	
> 	refuses to create the directory xx in /backup/usr and copies
> 	the contents of the directory to /backup

Actually that's a feature not a bug:

  /usr/xx means "the directory xx" so it creates /backup/usr/xx

  /usr/xx/ means "the contents of xx" so it copies the contents
  directly into /backup/usr/ without creating an xx destination

Just use whichever one is appropriate.


More information about the rsync mailing list