Invoking rsync from a script with null parameters

Voelker, Bernhard bernhard.voelker at
Tue Nov 6 04:01:20 MST 2012

Kevin Korb wrote (Monday, November 05, 2012 5:48 PM):

> Well, I am thinking that this is actually expected behavior that I had
> just never seen before.  Even cat and ls duplicate this behavior.

Not quite: while the coreutils programs issue an error message for
zero-lenght file names as it's required by POSIX, rsync does not.

  $ ls -l ''
  /bin/ls: : No such file or directory
  $ mkdir a b && cd a && touch f && rsync '' -ai . ../b/.
  >f+++++++ f
  $ rsync -ai '' ../b/.

Have a nice day,

More information about the rsync mailing list