31

To make the story short, I did an rsync:

rsync -avP user@exampleserver.com:/tmp/

And I forgot to put in my source directory...

I really meant to run:

rsync -avP /tmp/ user@exampleserver.com:/tmp/

It printed a bunch of files, but I don't know where it copied them because I didn't specify a destination. Does anyone know what happened? I did an ls on the current folder, but I didn't find anything.

  • 2
    I'd assume you'd just de-rez. – Jason C Mar 14 '14 at 0:23
36

From man rsync:

   Usages with just one SRC arg and no DEST arg will list the source files
   instead of copying.

this as explanation below the invocation options, for you the invocation matches:

Pull: rsync [OPTION...] [USER@]HOST::SRC... [DEST]
  • That's a relief but why not just print an error – Brian Mar 13 '14 at 19:35
  • 3
    @0A0D actually it is a feature that I have used. You first run without a destination to see what file are going to involved and make sure those are the right ones, and then you reissue the command with the destination appended. – Anthon Mar 13 '14 at 19:38
  • @Anthon: Ah, that would make sense. I suppose a -t (for test) would be more verbose to me. – Brian Mar 13 '14 at 19:39
  • 1
    @0A0D Dry run of rsync is invoked with -n/--dry-run. – oakad Mar 14 '14 at 0:22
  • 1
    @inemanja: it was more commentary on the -t option than anything else – Brian Apr 28 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.