47

To make the story short, I did an rsync:

rsync -avP [email protected]:/tmp/

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

I really meant to run:

rsync -avP /tmp/ [email protected]:/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.

Questionmark
  • 3,885
  • 8
  • 37
  • 57

1 Answers1

51

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]
Anthon
  • 78,313
  • 42
  • 165
  • 222
  • That's a relief but why not just print an error – Engineer2021 Mar 13 '14 at 19:35
  • 4
    @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. – Engineer2021 Mar 13 '14 at 19:39
  • 2
    @0A0D Dry run of rsync is invoked with -n/--dry-run. – oakad Mar 14 '14 at 00:22
  • @Brian -t is not for testing. It has a completely different meaning... DO NOT use it for testing... As said you can use -n if you want to test... -t is something else – inemanja Apr 27 '19 at 17:15
  • 1
    @inemanja: it was more commentary on the -t option than anything else – Engineer2021 Apr 28 '19 at 00:15
  • @Brian I assumed you new. It was more of message to someone who tumble into comments, not to use - t for testing.. – inemanja Apr 28 '19 at 10:25