• rsync without a destination - what happens?

    From Kenny McCormack@21:1/5 to All on Fri Feb 25 17:53:13 2022
    I recently ran the following command:

    $ rsync -avxH remotesystem:path/to/something

    I.e., I forgot to put "." at the end of the line, to copy the stuff from
    the remote system to the current directory.

    The result of the above command was that it listed all the files (and subdirectories and files in the subdirectories and so on), in the same
    manner and format that it would if it was copying them somewhere, but (and here's the key!) nothing was copied. I was shocked to see that after the command finished, the current directory was (still) empty. As far as I can tell nothing was changed - either on the local or the remote system(s).

    So, what is the above command supposed to do? "man rsync" shows that the "DEST" argument is optional, but doesn't say what happens if it is omitted.
    As far as I can tell, there aren't any examples in "man rsync" that omit
    DEST.

    Note: When I re-ran the above command with "." at the end, it performed as expected.

    --
    The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL:
    http://user.xmission.com/~gazelle/Sigs/IceCream

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to Kenny McCormack on Fri Feb 25 18:31:52 2022
    On Fri, 25 Feb 2022 17:53:13 +0000, Kenny McCormack wrote:

    I recently ran the following command:

    $ rsync -avxH remotesystem:path/to/something

    I.e., I forgot to put "." at the end of the line, to copy the stuff from
    the remote system to the current directory.

    The result of the above command was that it listed all the files (and subdirectories and files in the subdirectories and so on), in the same
    manner and format that it would if it was copying them somewhere, but
    (and here's the key!) nothing was copied. I was shocked to see that
    after the command finished, the current directory was (still) empty. As
    far as I can tell nothing was changed - either on the local or the
    remote system(s).

    So, what is the above command supposed to do? "man rsync" shows that
    the "DEST" argument is optional, but doesn't say what happens if it is omitted.

    Actually, it does. From rsync(1):
    As a special case, if a single source arg is specified without a desti-
    nation, the files are listed in an output format similar to "ls -l".


    As far as I can tell, there aren't any examples in "man rsync" that omit DEST.
    Note: When I re-ran the above command with "." at the end, it performed
    as expected.

    HTH
    --
    Lew Pitcher
    "In Skills, We Trust"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From marrgol@21:1/5 to Kenny McCormack on Fri Feb 25 19:30:17 2022
    On 25/02/2022 at 18.53, Kenny McCormack wrote:
    I recently ran the following command:

    $ rsync -avxH remotesystem:path/to/something

    I.e., I forgot to put "." at the end of the line, to copy the stuff from
    the remote system to the current directory.

    The result of the above command was that it listed all the files (and subdirectories and files in the subdirectories and so on), in the same
    manner and format that it would if it was copying them somewhere, but (and here's the key!) nothing was copied. I was shocked to see that after the command finished, the current directory was (still) empty. As far as I can tell nothing was changed - either on the local or the remote system(s).

    So, what is the above command supposed to do? "man rsync" shows that the "DEST" argument is optional, but doesn't say what happens if it is omitted.

    Yes it does:

    »As a special case, if a single source arg is specified without
    a destination, the files are listed in an output format similar
    to "ls -l".«


    --
    mrg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David W. Hodgins@21:1/5 to Kenny McCormack on Fri Feb 25 13:45:26 2022
    On Fri, 25 Feb 2022 12:53:13 -0500, Kenny McCormack <gazelle@shell.xmission.com> wrote:

    I recently ran the following command:

    $ rsync -avxH remotesystem:path/to/something

    I.e., I forgot to put "." at the end of the line, to copy the stuff from
    the remote system to the current directory.

    The result of the above command was that it listed all the files (and subdirectories and files in the subdirectories and so on), in the same
    manner and format that it would if it was copying them somewhere, but (and here's the key!) nothing was copied. I was shocked to see that after the command finished, the current directory was (still) empty. As far as I can tell nothing was changed - either on the local or the remote system(s).

    So, what is the above command supposed to do? "man rsync" shows that the "DEST" argument is optional, but doesn't say what happens if it is omitted. As far as I can tell, there aren't any examples in "man rsync" that omit DEST.

    Note: When I re-ran the above command with "." at the end, it performed as expected.

    From "man rsync" ...
    if you specify no local destination then a listing of the specified files on the remote daemon is provided.

    Regards, Dave Hodgins

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to David W. Hodgins on Fri Feb 25 22:46:20 2022
    In article <op.1h5s10ina3w0dxdave@hodgins.homeip.net>,
    David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    ...
    From "man rsync" ...
    if you specify no local destination then a listing of the specified
    files on the remote daemon is provided.

    OK. Thanks.

    The man page is a bit, shall we say, dense.

    Anyway, that explains it.

    Incidentally, it seems odd to me that it would do this, but I suppose they
    did it that way for a reason...

    --
    The scent of awk programmers is a lot more attractive to women than
    the scent of perl programmers.

    (Mike Brennan, quoted in the "GAWK" manual)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)